xcode 操作GIT@OSC 总提示密码不对?
大家好,提供个奇怪的问题:
我按照以下这个链接部署了GIT项目成功,当时也COMMITE PUSH上去了,然后,过了一段时间(其间我没重新操作过GIT设置等),我编完了一些代码,再次commite push时,提出输入密码,然后,密码绝对是正确的,也被拒绝了。
http://my.oschina.net/zxs/blog/142544
这种情况,我试了两次,都是当时可以,过一段时间就不行了,密码不对,又了重操作一遍。
感谢大家啊。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
你现在只有github_rsa并没有id_rsa,不知道你加到gitosc的是id_rsa.pub还是github_rsa.pub,如果不是github_rsa.pub的话,那就只能重新添加了。
你好:
我把原来的github_rsa两个文件删了,
如果我按照他的说明,输入下面的Enter file in which to save the key (/Users/diaosi/.ssh/id_rsa):diaosi, 则不能生成id_rsa.pub
#FFFFFF;">如果我此处不输入diaosi, 只用空回车,则能生成444444;font-family:Verdana, sans-serif, 宋体;font-size:14px;line-height:normal;background-color:#FFFFFF;">github_rsa,然后我将444444;font-family:Verdana, sans-serif, 宋体;font-size:14px;line-height:normal;background-color:#FFFFFF;">github_rsa.pub加入网上公钥中,目前OK了,估计过段时间再看也OK。
不知道是不是他写的引导有问题。。。
//************
第一步:成生SSH密钥
打开终端命令工具,输入命令:ssh-keygen -t rsa -C "diaosi@gmail.com"
注意ssh-keygen没有空格。屏幕输出:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/diaosi/.ssh/id_rsa):diaosi
....
回复
你好,我是按照方法做的, 未提到你说的这两个文件,但应该是下面的状态,说明了什么呢,应该怎么改呢?
另外此项目我的确之前加到过github上,是否是它导致了这种现像?
jotekiMacBook-Air:.ssh xujun$ pwd
/Users/xujun/.ssh
jotekiMacBook-Air:.ssh xujun$ ls -a
. .. github_rsa github_rsa.pub known_hosts
jotekiMacBook-Air:.ssh xujun$
你添加到gitosc的时github_rsa.pub 还是id_rsa.pub ?
你好,请看如下,谢谢:
jotekiMacBook-Air:Git-Followjoy-UI xujun$ ssh -vT git@git.oschina.net
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to git.oschina.net [211.155.89.193] port 22.
debug1: Connection established.
debug1: identity file /Users/xujun/.ssh/id_rsa type -1
debug1: identity file /Users/xujun/.ssh/id_rsa-cert type -1
debug1: identity file /Users/xujun/.ssh/id_dsa type -1
debug1: identity file /Users/xujun/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA e3:ee:82:78:fb:c0:ca:24:65:69:ba:bc:47:24:6f:d4
debug1: Host 'git.oschina.net' is known and matches the RSA host key.
debug1: Found key in /Users/xujun/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/xujun/.ssh/github_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/xujun/.ssh/id_rsa
debug1: Trying private key: /Users/xujun/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
git@git.oschina.net's password:
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
git@git.oschina.net's password:
你把ssh -vT git@git.oschina.net 发出来看一下
结果如何了?
回复
你好,今天我又commit了,又提示输入密码,输入后又错了,我们另一个同事也同样的情况,怎么会这样呢??
回复
以前用gitHub时没遇到这种情况,它网络太慢才切过来的。。
引用来自“Zoker”的评论
你是不是升级了xcode 或者command line tools,那你需要重新设置一遍了。
你是不是升级了xcode 或者command line tools,那你需要重新设置一遍了。