问题描述
我遵循了GitHub教程中的所有内容: https://help.github.com/articles/generating-ssh键
I followed everything in the GitHub tutorial: https://help.github.com/articles/generating-ssh-keys
我在存储库目录中执行了所有命令.我已成功到达本教程的结尾,并收到以下消息:您好,用户名!您已成功通过身份验证,但是GitHub不提供外壳程序访问权限."
I did all the commands in the directory of my repository.I reached the end of tutorial successfully and got the message: "Hi username! You've successfully authenticated, but GitHub does not # provide shell access."
但是,当我尝试执行诸如push之类的操作时,仍然要求输入我的用户名和密码.
However when I tried to do things such as push it still requested for my username and password.
推荐答案
通过git remote -v
检查您的remote
.
https://
URL总是会要求输入密码.有关更多信息,请参见此问题.
https://
URLs will always ask for a password, unless you configure a credential helper. More info on that in this question.
最简单的无密码git访问解决方案是使用 git remote set-url
命令并为现有存储库设置 SSH 网址.
The simplest solution for password-less git access would be to use the git remote set-url
command and set an SSH url for the existing repo.
您的情况是git remote set-url origin [email protected]:name/repo
.
这时您应该可以git push origin <branch>
而无需输入密码.
Then you should be able to git push origin <branch>
without being asked for a password.
这篇关于SSH身份验证后仍然需要登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!