Git clone http 带密码

标签 git github

我正在尝试通过 http 克隆一个私有(private) git 存储库。这里有一个类似的问题:Git clone using http with user and password .

有没有办法在提示时不输入用户/密码就可以执行 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': 

我该怎么做才能不必手动输入用户名/密码?

请注意,执行正常的 https://github.com/user/Automator.git 并在提示时手动输入用户名/密码可以正常工作。

最佳答案

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

如果您使用的是 Git 1.7.9 或更高版本,请考虑使用更安全的 credential helper mechanism .

关于Git clone http 带密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13298198/

相关文章:

git - 永久禁用 Visual Studio 2015 中的 Git 集成

android - 在 Android Studio 中刷新远程 Git 分支

git - 如何在 git 索引上打印当前文件?

git pull origin master 保留 settings.py

git - 在 GitHub 上执行 pull 请求时避免不需要的 merge 提交和其他提交

git - 在github中怎么说这就是我

git - 从 Azure DevOps 访问本地 Bitbucket 服务器

git - 是否有使用 Github 提供的 noreply 电子邮件的 git push 解决方法,而不取消勾选 "Block command line pushes that expose my email"?

git - 如何 git merge --squash 以便 github "network"图显示 merge

reactjs - GitHub 页面自定义域 404