4

First time since a tutorial in July that I'm trying to do a remote push on Github. I added my SSH key, and i can successfully connect to Github, but when i do:

$ git push origin master

I get

ssh: github: no address associated with name
fatal: The remote end hung up unexpectedly

I tried:

$ git remote set-url origin git@github:oscargodson/storageLocker.git

As i saw that on other posts, but it doesn't seem to help...

My project is: https://github.com/OscarGodson/storageLocker

in case that helps... maybe my syntax is wrong? Also, not sure if this changes anything either, but I'm on a Windows 7 64bit machine running the Git Shell app (MINGW32)

EDIT

So, i'm super close, but it's driving me insane. I had a non-fast-forward error, so i pulled my project and now i rm --cached all the files, now im trying to add new files (since this is a complete rewrite of the project) but it says

"you cannot do a partial commit during a merge."

so i do

git merge [FILE]

and it says

"you have not concluded your merge (MERGE_HEAD exists)"

WTF?! It's like an infinite loop... i can't merge until i commit and i can't commit until I merge?!

Abizern
  • 146,289
  • 39
  • 203
  • 257
Oscar Godson
  • 31,662
  • 41
  • 121
  • 201
  • You aren't supposed to merge! You are supposed to commit, but you can't commit until you fix the merge conflicts. And you can't do a partial commit. At least, thats what I got out of the error. – alternative Nov 24 '10 at 22:18

2 Answers2

6

It looks like you made a typo...you're missing .com in the remote's URL:

git@github:oscargodson/storageLocker.git

Should be

git@github.com:oscargodson/storageLocker.git
brianz
  • 7,268
  • 4
  • 37
  • 44
  • So, i'm super close, but it's driving me insane. I had a non-fast-forward error, so i pulled my project and now i rm --cached all the files, now im trying to add new files (since this is a complete rewrite of the project) but it says "you cannot do a partial commit during a merge." so i do git merge [FILE] and it says "you have not concluded your merge (MERGE_HEAD exists)" WTF?! It's like an infinite loop! – Oscar Godson Nov 24 '10 at 20:53
  • Git is telling you that your local master branch has diverged from the remote master branch, and that pushing it will clobber the history on the remote. By default it will reject operations like this (non-fast-forwards). It's beyond the scope of this question, but if you don't care about what is on the remote, you can add the `-f` option when you push. – brianz Nov 24 '10 at 20:54
  • I updated my question. Also, when I do git status i can't see the 2 files i want to commit... I see Untracked files: and all the files i rm --cached... – Oscar Godson Nov 24 '10 at 20:57
0

It could be because of their outage earlier this month:

https://github.com/blog/744-today-s-outage

Matthew Rathbone
  • 8,144
  • 7
  • 49
  • 79
  • Hmm, reading the post though doesn't say anything about losing old projects. Mine was created prior to July 19th even. I did a complete rewrite of the code, could I just erase the repo and recreate it somehow on github? – Oscar Godson Nov 24 '10 at 20:30
  • I guess you could just delete the repo, create a new one, and add that as a remote from your local code. Also double check you have push-rights to the repository. – Matthew Rathbone Nov 24 '10 at 20:32
  • If you browse to your repo on github, look at the repo url, it will say something like: 'Read access only', or 'Read + Write'. (when you're signed in of course) – Matthew Rathbone Nov 24 '10 at 20:37