Hi we are trying to clone a git repo from our local Azure DevOps server 2020.0.1. We are using the command bellow, but it is not working. Should this be possible?
The documentation I try to follow is this. But it is a bit unclear.
git clone https://{an username:yourPAT}@yourURL/yourOrgName/yourProjectName/_git/yourRepoName
We then get an error: "fatal: Authentication failed for "
We also tried variations like 'yourname:yourPAT', 'yourPAT', ':yourPAT', 'yourPAT:'
We want to use PAT's together with SmartGit
We then tried to use the other method mentioned (but when reading this is only needed when using basic authentication, we never enabled this on our ADOS-server, and is also not an authentication method on our IIS-website:
$MyPat = 'yourPAT'
$B64Pat = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$MyPat"))
git -c http.extraHeader="Authorization: Basic $B64Pat" clone https://{yourURL/yourOrgName/yourProjectName/_git/yourRepoName
This one is working
The PAT we created is with full scope and access to all organizations.
The PAT is working to add an Agent.
We can also use it to access the RESTAPI (with curl you should -u and random or empty username, so bla;yourPAT).
Any advice is appreciated.