Sourceforge:“...似乎不是 git 存储库”
我在 Sourceforge 上启动了一个项目,主要是为了尝试它是如何工作的。这是该项目的链接: https://sourceforge.net/projects/tachikomawall/ 但是该项目的源代码对我不起作用。我正在尝试使用 GIT 来达到这个目的。这是它返回的错误:
[18:09] matachi ~/Projects/htdocs/Tachikoma-Wall $ git push origin master
[email protected]'s password:
fatal: '/gitroot/tachikomawall/code' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
这是我之前在终端中输入的一些行(我认为我没有忘记任何内容):
[17:57] matachi ~/Projects/htdocs/Tachikoma-Wall $ git init
[17:57] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config user.name "MaTachi"
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config user.email "[email protected]"
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git add .
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git commit
[master (root-commit) 637d52b] first commit
5 files changed, 91 insertions(+), 0 deletions(-)
create mode 100644 README
create mode 100644 images/bg.png
create mode 100644 include/style.css
create mode 100644 index.html
create mode 100644 index.php
[18:08] matachi ~/Projects/htdocs/Tachikoma-Wall $ git remote add origin ssh://[email protected]/gitroot/tachikomawall/code
[18:08] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config branch.master.remote origin
[18:09] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config branch.master.merge refs/heads/master
根据错误消息,我猜测我没有编写正确的存储库名称。正如你所理解的,我以前没有使用过 GIT,也不太了解它是如何工作的。
I have started a project on Sourceforge, mainly for trying out how it works. Here is a link to the project: https://sourceforge.net/projects/tachikomawall/ But pushing the source code to the project doesn't work for me. I'm trying to use GIT for the purpose. Here is the error it returns:
[18:09] matachi ~/Projects/htdocs/Tachikoma-Wall $ git push origin master
[email protected]'s password:
fatal: '/gitroot/tachikomawall/code' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Here are some lines that I typed in the terminal before (I don't think I forgot anything):
[17:57] matachi ~/Projects/htdocs/Tachikoma-Wall $ git init
[17:57] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config user.name "MaTachi"
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config user.email "[email protected]"
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git add .
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git commit
[master (root-commit) 637d52b] first commit
5 files changed, 91 insertions(+), 0 deletions(-)
create mode 100644 README
create mode 100644 images/bg.png
create mode 100644 include/style.css
create mode 100644 index.html
create mode 100644 index.php
[18:08] matachi ~/Projects/htdocs/Tachikoma-Wall $ git remote add origin ssh://[email protected]/gitroot/tachikomawall/code
[18:08] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config branch.master.remote origin
[18:09] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config branch.master.merge refs/heads/master
I guess according to the error message that I haven't written the correct repository name. As you may understand, I haven't used GIT before and doesn't really understand how it works yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,并看到了对您问题的评论。
只是为了澄清起见:
https://sourceforge.net/apps/trac/sourceforge 上的指南/wiki/Git 是错误。
不要从以下位置克隆/拉取/推送:
相反,执行它来自:
I had the same problem and saw the comments on your question.
Just for clarification's sake:
The guide on https://sourceforge.net/apps/trac/sourceforge/wiki/Git is wrong.
Don't clone/pull/push from:
Instead, do it from: