Git克隆http用密码

Dav*_*542 14 git github

我试图通过http克隆一个私人git存储库.这里有一个类似的问题:Git克隆使用http与用户和密码.

有没有办法在没有输入用户/密码的情况下进行git clone?

当我尝试做的时候:

prodroom15:mquimiro$ git clone https://github.com/user:password/Automator.git
Cloning into 'Automator'...
Username for 'https://github.com': 
Password for 'https://github.com': 
Run Code Online (Sandbox Code Playgroud)

我该如何做到这一点,以便我不必手动输入用户名/密码?

请注意,正常https://github.com/user/Automator.git并在提示符下手动输入用户/密码正常.

Wes*_*ser 22

我认为语法实际上https://user:password@github.com不是https://github.com/user:password.

如果您使用的是Git 1.7.9或更高版本,请考虑使用更安全的凭据帮助程序机制.