[英]Git clone http with password
I am trying to clone a private git repository via http. 我试图通过http克隆一个私人git存储库。 There is a similar question here: Git clone using http with user and password .
这里有一个类似的问题: Git克隆使用http与用户和密码 。
Is there a way to do git clone without entering a user/password at the prompt? 有没有办法在没有输入用户/密码的情况下进行git clone?
When I try and do: 当我尝试做的时候:
prodroom15:mquimiro$ git clone https://github.com/user:password/Automator.git
Cloning into 'Automator'...
Username for 'https://github.com':
Password for 'https://github.com':
How would I do this so that I don't have to type in the user/password manually? 我该如何做到这一点,以便我不必手动输入用户名/密码?
Note that doing the normal https://github.com/user/Automator.git
and manually entering in the user/password at the prompt works fine. 请注意,执行正常的
https://github.com/user/Automator.git
并在提示符下手动输入用户/密码正常。
I think the syntax is actually https://user:password@github.com
not https://github.com/user:password
. 我认为语法实际上是
https://user:password@github.com
而不是https://github.com/user:password
。
If you are using Git 1.7.9 or later, consider using the more secure credential helper mechanism . 如果您使用的是Git 1.7.9或更高版本,请考虑使用更安全的凭据帮助程序机制 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.