I'm having a problem simply cloning a VSTS (Azure DevOps) git repository on my newly set up PopOS Linux machine. I'm using VSTS PATs (Personal Access Tokens).
The Issue
The following statement from the command line prompts me for a password, which it should not:
git clone https://personalAccessToken@company.visualstudio.com/blah/_git/blah
The response from the command line is:
Password for 'https://personalAccessToken@company.visualstudio.com':
If you're familiar with PATs in VSTS, this should not prompt for a password - it should just clone the repo. On Windows, this works. On my other Linux machine running Elementary OS, this works. It just doesn't work in PopOS Linux for some reason.
Other Details
I don't know how you've managed to do:
git clone https://personalAccessToken@company.visualstudio.com/blah/_git/blah
When you do that you're passing the PAT as HTTP Basic username, which is incorrect and shouldn't have worked with any sane version of git.
To use PAT with git, you need to pass the PAT as HTTP Basic password, and you can use any username as it's ignored. So the correct remote url syntax should be:
git clone https://git:personalAccessToken@company.visualstudio.com/blah/_git/blah
or perhaps even:
git clone https://:personalAccessToken@company.visualstudio.com/blah/_git/blah
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.