我想将我的代码推送到github.com。
我使用win Xp和git-bash 1.7.2.3
在ssh测试过程中,我得到了下面的成功消息。
但是"git push origin master“命令需要用户名和密码。
debug1: Entering interactive session.
ERROR: Hi xxx! You've successfully authenticated, but GitHub does not provi
de shell access
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
debug1: Transferred: stdin 0, stdout 0, stderr 34 bytes in 0.7 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 51.8
debug1: Exit status 1
rafael@NETBOOK-RAFAEL /d/project/clojure/anagram (master)
$ git push origin master
Username:
`fatal: Could not read password: No such file or directory`发布于 2010-09-19 20:48:12
您必须创建一个ssh密钥并将公钥上传到github,以便github能够使用该密钥对您进行身份验证。我认为在Windows中,ssh密钥驻留在您的配置文件(c:\documents and settings\<username>)的.ssh文件夹中。因此,创建密钥并将id_rsa.pub的内容(这是名称,除非您更改它)上传到Github。
发布于 2010-09-19 20:35:22
你设置你的GitHub id了吗?(因为GitHub是基于Token identification的)
git config --global github.user "your-github-username"
git config --global github.token "your-github-token"参见GitHub Help page。
关于Vasileios Lourdas关于ssh的answer,请确定$HOME在git bash会话中的值是什么。
VonC@VONC ~
$ pwd
/c/Users/VonC
Vonc@VONC ~
$ echo $HOME
/c/Users/VonC在Xp上,这将是c:\Document And Settings\VonC。
这意味着您的ssh公钥文件id_rsa.pub必须具有以下路径:
c:\Document And Settings\VonC\.ssh\id_rsa.pub发布于 2010-11-23 01:54:12
使用HTTPS接口可能会出现问题。切换到目录并运行"git remote -v“列出如何配置您的远程,然后发布它。
https://stackoverflow.com/questions/3745664
复制相似问题