我们在内部网络上有一个 Gitorious 服务器。当我使用 web 界面在 myproject/myrepo.git 创建一个 repo 时,Gitorious 指示我进入我的源代码文件夹,然后:
混帐初始化。 混帐添加。 git commit -m "第一个计时器" git remote add origin git@myservername:myproject/myrepo.git git push -u 起源大师
当我这样做时,它会错误地告诉我,
“致命:'myproject/myrepo.git' 似乎不是 git 存储库” 《致命:远端意外挂断》
我可以通过输入完整路径名来解决这个问题
git 远程 rm 起源 git remote add origin git@myservername:/opt/gitorious-3.1.1-1/apps/gitorious/repositories/myproject/myrepo.git
但我宁愿不必这样做。似乎某个地方应该知道将 git 协议指向何处,就像 apache 服务器如何知道在 htdoc 文件夹或其他东西中查找文档一样。我有一种感觉,这既不是 git 的问题,也不是 gitorious 的问题,而是软件堆栈上的问题。
我的问题是我该如何解决这个问题?这个设置在哪里?我应该在谷歌搜索的主题是什么?