我正在尝试通过 Azure DevOps 中的 bash 任务克隆私有 Bitbucket 存储库。这是命令
git clone --branch master https://username:password@bitbucket.org/repo.git
早些时候我收到了这个错误
"fatal: could not read Password for 'https://***@bitbucket.org': terminal prompts disabled"
这就是为什么我在 URL 中也包含密码以使其正常工作,但现在我明白了。
fatal: unable to access 'https://bitbucket.org/realogy-abt/apipublishing.git/': Could not resolve host: ***
我尝试使用 user.name 和 email 以及远程源 url 设置全局 git 配置,但没有任何效果。
git config --global user.email "xxx"
git config --global user.name "xxxx"
我正在通过 Azure DevOps 中的 bash 任务尝试此操作。任何帮助,将不胜感激。编辑添加:相同的克隆与 Github 存储库无缝协作。