Reputation: 31
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://[email protected]/blah/_git/blah
The response from the command line is:
Password for 'https://[email protected]':
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
Upvotes: 0
Views: 2052
Reputation: 64915
I don't know how you've managed to do:
git clone https://[email protected]/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:[email protected]/blah/_git/blah
or perhaps even:
git clone https://:[email protected]/blah/_git/blah
Upvotes: 3