MainelyDesign.com Blog

Weird Git Error After Upgrade: Repository not found. Make sure you include the .git

Posted on 02/02/2010 at 08:18 am by Kevin Wentworth
Viewed 12,876 times | 0 comments

This isn't a weird error in that I've never seen it (ususally when I forget to load up Pagaent before attempting Github push/pulls).  It's weird because everything was working perfectly and then I couldn't do anything from remote!  I upgraded msysgit recently and hadn't tried to do any remote commands until yesterday.  And I kept getting the following error in Git Gui:

ERROR:  site:support.github.com Repository not found.  Make sure you include the .git, e.g. git@github.com:defunkt/ambition.git fatal: The remote end hung up unexpectedly

I found a posting on the github support forum that finally clued me in on where I could see what "address" was tied to the named remote in Git Gui.  Until this point I couldn't even see what the "origin" remote address was!  If you go into the Git repository folder you'll see a folder named .git.  In that folder is a file named config.  That's where you can see what remote addresses are tied to each remote shortcut for that Git repository.

My issue was in my .git/config file

Looking at my .git/config file I noticed that there was actually a '\n' in the config file at the end of my remote url config block.  I figured that might be the problem, so I removed it and reloaded Git Gui.  It worked!  Somewhere in my upgrade a windows style line ending must have been turned into an escaped character instead of an actual new line.

My .git/config file before and after:

  1. [core]
  2.     repositoryformatversion = 0
  3.     filemode = false
  4.     bare = false
  5.     logallrefupdates = true
  6.     symlinks = false
  7.     ignorecase = true
  8. [gui]
  9.     geometry = 1016x572
  10. [remote "origin"]
  11.     url = git@github.com:kwentworth/repo.git\n
  12.     fetch = +refs/heads/*:refs/remotes/origin/*

And, after (no line ending after url=):

  1. [core]
  2.     repositoryformatversion = 0
  3.     filemode = false
  4.     bare = false
  5.     logallrefupdates = true
  6.     symlinks = false
  7.     ignorecase = true
  8. [gui]
  9.     geometry = 1016x572
  10. [remote "origin"]
  11.     url = git@github.com:kwentworth/repo.git
  12.     fetch = +refs/heads/*:refs/remotes/origin/*

Cheers,
-Kevin Wentworth

Bookmark and Share

Tags for Weird Git Error After Upgrade: Repository not found. Make sure you include the .git

Git | Usage | Windows | Errors

Comments for this Posting

No comments. Be the first to post a reply.

Sorry, comments are closed for this posting.

Please Email Kevin if you have any questions. Thanks!

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design