threads / discuss / 63282

git credential management Mac OS

Subject: git credential management Mac OS

## tl;dr

2 messages between Apr 11, 2025 and Apr 13, 2025.

replies: 1people: 2as markdown or json

Lukas Michael· Apr 11, 2025, 11:09 UTC · lore
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· Apr 13, 2025, 03:11 UTC · re: Lukas Michael · lore

Re: git credential management Mac OS

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

← back to recent threads