可以克隆 git 存储库,在命令中指定用户名和密码。例子:
git clone https://username:[email protected] /cdn-cgi/l/email-protection/file.git
推送时是否可以同时指定用户名和密码?例如,运行git push origin --all
然后将输出要求输入密码。我希望通过一个命令实现这一点。
(我知道设置密钥和其他解决方案的能力,但我想知道是否有一种方法可以通过一个命令继续使用用户名和密码。)我在 Windows 8.1 上运行 Git Bash。
是的,你可以做
git push https://username:[email protected] /cdn-cgi/l/email-protection/file.git --all
在这种情况下https://username:[email protected] /cdn-cgi/l/email-protection/file.git
更换origin
in git push origin --all
要查看更多选项git push
, try git help push
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)