我正在尝试使用我的密码git clone
命令克隆存储库,但总是会出现以下错误:
remote: Login failed due to incorrect login credentials or method.
remote: If you are unsure of which login details or login method to use, visit:
remote: https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/
fatal: Authentication failed for 'http://bitbucket.org/qhluo123/ceye-admin.git/'
这是我的克隆命令:
git clone http://username:[email protected]/qhluo123/ceye-admin.git
我无法使用 ssh 或弹出密码方法,因为我正在远程系统上自动克隆和部署存储库。在此过程中,用户方无法进行任何输入。我有什么办法可以解决这个问题吗?
添加 SSH 不是一个解决方案,因为我将其部署在 Microsoft 的 ARM 模板中,并且 ARM 模板始终会创建一个新的虚拟机。
尝试使用HTTPS 访问令牌而不是您的帐户密码。
大多数远程 Git 存储库托管服务(GitHub、GitLab、Bitbucket)使用令牌作为密码。
最好也使用一个Git 凭证助手,像,作为根据 Azure 文档, the Git 凭证管理器附带Git Windows 版.
这样,您就不必在纯文本 URL 中使用您的令牌。
在您的情况下,由于克隆是在远程部署 ARM 服务器上进行的,因此这可能不适用,但使用令牌而不是密码仍然是推荐的选项。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)