fatal:'/Code/project' does not appear to be a git repository

119 views
Skip to first unread message

kc9...@gmail.com

unread,
May 17, 2014, 4:32:27 PM5/17/14
to msy...@googlegroups.com
Alrighty then, I can't figure this one out. Overview: machine running debian wheezy. I ssh into this machine with putty from Windows machine, create the directory ~/Code/project, cd into the directory and run: git init; echo "test">test.txt; git add .;git commit -m "added test". I then verify with git status and git log. Everything is Aok. Close putty, pointy clicky thing to directory in windows->Git Bash Here. Type in git clone ssh://user@server:port/Code/project >trace.log 2>&1 . Below is output:

Cloning into 'project'...
fatal: '/Code/project' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I have checked the auth.log on the server and it accepts my public key every time. I can ssh into my account from the Git Bash window. I installed msysgit to convert line endings. I don't know where to go from here?

kc9...@gmail.com

unread,
May 18, 2014, 8:06:47 AM5/18/14
to msy...@googlegroups.com, kc9...@gmail.com


On Saturday, May 17, 2014 3:32:27 PM UTC-5, kc9...@gmail.com wrote:
Type in git clone ssh://user@server:port/Code/project >trace.log 2>&1 . Below is output:

Cloning into 'project'...
fatal: '/Code/project' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Well this saved my bacon; answer. For those that may have the same problem here is my description of what I was going on. In this instance I use a none standard ssh port on my machines. In doing so I have to use the ssh:// url format to specify the port (for the life of me I couldn't get ssh to read my ~/.ssh/config file). However, in using the ssh url the path is relative to root, and not the users home directory. Bota Bing change user@server:port/Code/www to user@server:port/home/user/Code/www and presto. Good to go.

Torsten Bögershausen

unread,
May 18, 2014, 8:08:59 AM5/18/14
to kc9...@gmail.com, msy...@googlegroups.com

user@server:port/home/user/Code/www and presto. Good to go.
>

Or use the tilde:
git clone ssh://user@server:port/~Code/project

Reply all
Reply to author
Forward
0 new messages