Reputation: 1397
I'm trying to clone a git repo that is on Azure DevOps from a pipeline job, however, I get the following error (shown in the pipeline terminal on Azure DevOps):
fatal: could not read Password for 'https://[email protected]': terminal prompts disabled
Looks like it needs a password, but I don't know how to supply or even what password to give it.
Upvotes: 5
Views: 5679
Reputation: 271
For private projects the azure devops build VM doesn't have permission to clone your submodules. In order to give it permission to clone you can either add your username and password or add a personal access token(PAT) to the url in the gitmodules file in your repo on Azure devops. You need to change the url to https://username:[email protected]/organization/project/_git/repo or https://[email protected]/organization/project/_git/repo
I recommend using a PAT. You can create a PAT in Azure DevOps just look up how to do it.
Upvotes: 1
Reputation: 41595
You need to give the password but of course you can't because is during the build.
You can solve it in 2 ways:
1) Put the password in the command:
git clone https://username:[email protected]/organization/project/_git/repo
2) Create a Personal Access Token and put it in the command:
git clone https://[email protected]/organization/project/_git/repo
Upvotes: 9