2

I set up a Debian server that uses SSH for shell access and git repos. I created a bare repo on it and using ssh was able to clone it to my Windows 8 workstation, however when trying to push changes back to the Debian server I get the error depicted here:

enter image description here

Read from remote host 174.52.5.192: Connection reset by peer
fatal: sha1 file '<stdout>' write error: invalid argument
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'git@174.52.5.192:/home/git/repos/space-junk.git/'

I use this work station regularly for shell access to the same server via SSH so I know inability to access SSH isn't the problem.

Does anyone have any idea what's going wrong?

Jake Kiesel
  • 341
  • 4
  • 10

2 Answers2

3

Actually, the first push should be:

git push -u origin master

That will link the local branch master to its remote tracking one origin/master

Then, after that first push, you will be able (for all the subsequent push) to do a simple:

git push

See more at "Why do I need to explicitly push a new branch?".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

I got it working! It turns out the proper command was

git push origin master

The Windows version didn't have a descriptive enough error message but I got it working by switching over to Linux, which told me my command was wrong.

Jake Kiesel
  • 341
  • 4
  • 10