我正在尝试通过Azure DevOps中的bash任务克隆私有Bitbucket存储库。这是命令
git clone --branch master https://username:[email protected]/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 config,但是没有任何效果。
git config --global user.email "xxx"
git config --global user.name "xxxx"
我正在Azure DevOps的bash任务中尝试此操作。任何帮助,将不胜感激。编辑添加:同一克隆与Github repo无缝协作。
我使用下面的git命令在bash任务中对其进行了测试,并且可以正常工作。
git clone https://username:[email protected]/Workspace ID/repository.git
用户名显示在Bitbucket配置文件设置中。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句