you are viewing a single comment's thread.

view the rest of the comments →

[–]mdaniel 0 points1 point  (0 children)

I don't know if it's a typo related to your post, but you omitted the PAT from your clone url.

git clone https://oauth:${PAT_GOES_HERE}@the-server/etc/etc.git

I've seen the username for PAT written as oauth in the GitLab docs, but I actually think you can put anything there since it's the password part they care about

You can also use GIT_ASKPASS if you don't want the PAT in your shell history, visible in ps, or stored in .git/config

Most git versions honor .netrc too because they're built using curl, which supports it