Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
642 views
in Technique[技术] by (71.8m points)

git remote - fatal: does not appear to be a git repository

Why am I getting this error when my git repository url is correct?

jitendra@JITENDRA-PC /c/mySite (master)
$ git push beanstalk master
fatal: 'git@skarp.beanstalkapp.com/gittest.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

jitendra@JITENDRA-PC /c/mySite (master)
$ git clone git://github.com/jquery/jquery.git
Cloning into jquery...
Remote: Counting objects: 19803, done.
Remote: Compressing objects: 100% (5196/5196), done.
Remote: Total 19803 (delta 14204), reused 19549 (delta 14052)
Receiving objects: 100% (19803/19803), 12.80 MiB | 591 KiB/s, done.
Resolving deltas: 100% (14204/14204), done.

jitendra@JITENDRA-PC /c/mySite (master)
$ gitk --all

jitendra@JITENDRA-PC /c/mySite (master)
$ gitk -all

jitendra@JITENDRA-PC /c/mySite (master)
$ git remote add origin git@skarp.beanstalkapp.com/gittest.git

jitendra@JITENDRA-PC /c/mySite (master)
$ git push origin master
fatal: 'git@skarp.beanstalkapp.com/gittest.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

jitendra@JITENDRA-PC /c/mySite (master)

Edit: Replaced original screenshot

EDIT:

fatal: 'git@skarp.beanstalkapp.com/gittest.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You've got the syntax for the scp-style way of specifying a repository slightly wrong - it has to be:

[user@]host.xz:path/to/repo.git/

... as you can see in the git clone documentation. You should use instead the URL:

git@skarp.beanstalkapp.com:/gittest.git

i.e. in the URL you're using, you missed out the : (colon)

To update the URL for origin you could do:

git remote set-url origin git@skarp.beanstalkapp.com:/gittest.git

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...