简体   繁体   中英

fatal: not a git repository:'git'

I use git+bitbucket as my version control system.

When I do git push -u origin master ( origin uses https), I get:

fatal: not a git repository: 'git'
fatal: the remote end hung up unexpectedly

My version of git bash is 1.7.10. My OS is Win7.

To my surprise, if I use SSH protocol, I can push. I think there is some trouble with my https or my computer environment.

In most ways you cannot push over https . For this you need some more. In most way you push over ssh or the git protocoll because then you have enough rights to the git files.

Normally you get the message not a git repository when this folder where you are have no .git folder. But then its very strange that you can push over ssh.

Second ways is you get the message when the remote Repo is not there and he cannot find the bare file on the remote server. This is possible when you try it over https .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM