# git credential management Mac OS

2 messages from 2025-04-11 to 2025-04-13. Participants: Lukas Michael, Koji Nakamaru.
Thread: https://gitlist.dev/t/63282

## Lukas Michael, 2025-04-11 11:09

Subject: git credential management Mac OS
Message-ID: <CAEbzv6TfMai+vu76Jw157KyMNScwW6pUZaDXbN_u-XRKz_3wnQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAEbzv6TfMai%2Bvu76Jw157KyMNScwW6pUZaDXbN_u-XRKz_3wnQ%40mail.gmail.com

```
Dear git kernel team,

I want to know if there is a possibility to set my GitHub PAT as
credential without the need to clone or push a repository at the
moment. I want to setup my Mac and store the token for further git
clone / push operations which then need the token.

I hope you can understand my issue 😅

Kind regards

```

## Koji Nakamaru, 2025-04-13 03:11

Subject: Re: git credential management Mac OS
Message-ID: <CAOTNsDwaVGrpcuT42RUt37NPm9PwnrLz3dJv7JEfRLd4krY_KQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAOTNsDwaVGrpcuT42RUt37NPm9PwnrLz3dJv7JEfRLd4krY_KQ%40mail.gmail.com
In-Reply-To: <CAEbzv6TfMai+vu76Jw157KyMNScwW6pUZaDXbN_u-XRKz_3wnQ@mail.gmail.com>

```
On Fri, Apr 11, 2025 at 8:14 PM Lukas Michael <lukas.23022005@gmail.com> wrote:
> I want to know if there is a possibility to set my GitHub PAT as
> credential without the need to clone or push a repository at the
> moment. I want to setup my Mac and store the token for further git
> clone / push operations which then need the token.

You can utilize "git credential approve" as below:

cat <<EOF | git credential approve
protocol=https
host=github.com
username=$USER
password=$PAT
EOF

Koji Nakamaru

```
