Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git推送致命:不是git存储库:'';_Git - Fatal编程技术网

git推送致命:不是git存储库:'';

git推送致命:不是git存储库:'';,git,Git,我不明白,为什么“致命”在这里?实际上,所有提交都被推送 oleg@shoom-gnome:(master)~/workspace/S4$ git push Counting objects: 5, done. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 280 bytes, done. Total 3 (delta 2), reused 0 (delta 0) To ssh://account@host

我不明白,为什么“致命”在这里?实际上,所有提交都被推送

oleg@shoom-gnome:(master)~/workspace/S4$ git push
Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 280 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To ssh://account@host/var/git/S4
   79ea0f2..6e8a193  master -> master
fatal: Not a git repository: '.'

那么,如果远程上的
/var/git/S4
是一个git存储库,那么,可能是钩子脚本中发生了什么


而且,将我的评论复制到我刚刚投了赞成票的kmarsh的答案上:我推荐
account@host:/var/git/S4
而不是类似url的ssh格式。

如果远程设备上的
/var/git/S4
是git存储库,那么可能是钩子脚本中发生了什么

而且,将我的评论复制到我刚刚投了赞成票的kmarsh的答案上:我推荐
account@host:/var/git/S4
代替类似url的ssh格式。

替换:

ssh://account@host/var/git/S4

要获取完整路径,而不是相对于帐户主目录的路径。

替换:

ssh://account@host/var/git/S4


获取完整路径,而不是相对于帐户主目录的路径。

uh。。。现在我意识到它看起来很奇怪。我建议
account@host:/var/git/S4
然后代替类似url的表单。问题是,如果它是一个错误的目录,git应该走这么远吗?呃。。。现在我意识到它看起来很奇怪。我建议
account@host:/var/git/S4
然后代替类似url的表单。问题是,如果git是一个错误的目录,它应该走这么远吗?