tags:

views:

101

answers:

2

hello

I want to push my code to github.com.

I use win Xp and git-bash 1.7.2.3

And I got following success message during ssh testing.

But "git push origin master" command require username and password.

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`
A: 

Did you set your GitHub id? (since GitHub is based on Token identification)

git config --global github.user "your-github-username"
git config --global github.token "your-github-token"

See GitHub Help page.


Regarding Vasileios Lourdas's answer about ssh, make sure what is the value of $HOME in a git bash session.

VonC@VONC ~
$ pwd
/c/Users/VonC

Vonc@VONC ~
$ echo $HOME
/c/Users/VonC

On Xp, that would be c:\Document And Settings\VonC.
Meaning your ssh public key file id_rsa.pub must have the path:

 c:\Document And Settings\VonC\.ssh\id_rsa.pub
VonC
I did. But it doesn't work too.
rafael
@rafael: I have updated the answer with explicit path.
VonC
@VonC: sorry for late response. rafael@NETBOOK-RAFAEL ~/.ssh$ echo $HOME/c/Documents and Settings/rafael
rafael
@rafael: so you do have an id_rsa.pub file in `/c/Documents and Settings/rafael/.ssh` directory?
VonC
@VonC: you're right.
rafael
@rafael: and you did copy that public key in your GitHub account?
VonC
@VonC: Sure, I did.
rafael
@rafael: from a git bash session, what a `ssh -v` returns? (as in http://stackoverflow.com/questions/922210/unable-to-git-push-master-to-github/922461#922461)
VonC
+1  A: 

You have to create a ssh key and upload the public key to github, so that it will be able to authenticate you using the key. I think that in Windows, the ssh key resides inside the .ssh folder of your profile (c:\documents and settings\). So, create the key and upload the contents of id_rsa.pub (this is the name unless you change it) to Github.

Vasileios Lourdas
I did. But it doesn't work.
rafael