1
我使用GitHub在文件上存在SSH密钥。我正在尝试将更改推送给其他人的GitHub项目。我有协作者访问该帐户。在推送GitHub期间从命令行使用SSH密钥?
我被提示输入密码:
$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Username for 'https://github.com': xxxxxx
Password for 'https://[email protected]':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/weidai11/cryptopp.git/'
GitHub的在Which remote URL should I use?帮助只讨论一个桌面客户端的情况下SSH。我想他们有一个他们希望我使用的应用程序,但我并不想使用它。
如何让命令行工具使用我的SSH密钥将更改推送到GitHub帐户?
这与How do I checkout a GitHub project from command line as a Collaborator?。我永远无法使用凭据作为协作者签出,现在我陷入了这个密码验证陷阱。
谢谢VonC。有没有办法将GitHub配置为***只使用SSH密钥来访问我的密码?如果GitHub配置正确,那么它不会浪费我的时间与密码提示,我不会做这个客户端(在多台机器上)? – jww
@jww您将配置的是与您本地回购相关的远程URL:键入'git remote -v'来检查那些只是ssh url。并且/或者您可以使用'insteadOf'指令,如http://stackoverflow.com/a/26814985/6309中所述。 – VonC