Git(1.7.10)每次都会问我用户名和密码

Dan*_*Ruf 8 git ssh version-control credentials github

由于我有新版本,它不再问我在ssh密钥文件中设置的密码.

我每次推送时都会直接询问github用户名和密码.

这是git的新功能还是在过去改变了它还是在github上有什么变化?

我尝试使用ssh和我的ssh密钥文件中的电子邮件和密码进行身份验证,但它确实有效.

GitHub更改为smartftp并更改了设置repos的说明

https://github.com/blog/1104-credential-caching-for-wrist-friendly-git-usage

https://help.github.com/articles/create-a-repo

稍后看到,默认情况下,他们现在使用https而不是git协议

Tod*_*obs 5

前几天,当我从GitHub上的新存储库指令中剪切并粘贴时,我遇到了这个问题.有人应该提交错误报告,因为它让我认识的几乎每个人都感到困惑.

问题是指令告诉您创建使用https协议的远程,而不是git协议.我通常使用:

github_username=CodeGnome
git remote add origin "git@github.com:${github_username}/${PWD##*/}.git"
git push --tags --set-upstream origin master
Run Code Online (Sandbox Code Playgroud)

从预先存在的本地存储库中填充新的GitHub存储库.

  • @DanielRuf如果使用智能HTTP,则可以在Windows和OS X上使用凭据缓存.请参阅http://stackoverflow.com/a/10962447/1301972. (2认同)