1
votes

Am trying to clone a private Bitbucket repository via a bash task in Azure DevOps. This is the command

git clone --branch master https://username:[email protected]/repo.git

Earlier I was getting this error

"fatal: could not read Password for 'https://***@bitbucket.org': terminal prompts disabled"

which is why I included the password also in the URL to get it to work, but now I get this.

fatal: unable to access 'https://bitbucket.org/realogy-abt/apipublishing.git/': Could not resolve host: ***

I have tried setting the global git configs with user.name and email, and the remote origin url, but nothing works.

git config --global user.email "xxx"
git config --global user.name "xxxx"

I'm trying this from a bash task within Azure DevOps. Any help would be appreciated. Edited to add: The same clone worked seamlessly with Github repo.

1

1 Answers

1
votes

I tested it in the bash task with the below git command and it worked.

git clone https://username:[email protected]/Workspace ID/repository.git

enter image description here

enter image description here

The Username is showed in the Bitbucket profile settings .

enter image description here