Search code examples
gitdreamhost

git error on push : "fatal: The remote end hung up unexpectedly"


I have dreamhost account and wanted to host a git repository so I followed the steps here .

Here is the what I did:

1 - Installed tortoisegit and msysgit following the steps here (didnt generate a key)

2 - Using Git Bash (with username: geryit, host: geryit.net)

ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub
ssh [email protected] "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
eval `ssh-agent`
ssh-add

then created my local and remote repositories and

git remote add origin ssh://[email protected]/~/p5.git
git push origin master

then it asks for my username and password and after I type i got this error:

alt text

I tried assigning private putty key to tortoisegit but no luck. What am I doing wrong?


Solution

  • You need to create the git repo on the server:

    ssh [email protected]
    git init --bare ~/p5.git
    

    Then exit out of geryit.net and try your push again.

    You should not have to enter the password when logging into the server in the first line above. If you are prompted for a password, this means the key setup above didn't work.