Sourceforge:“...似乎不是 git 存储库”

发布于 2024-12-01 17:56:11 字数 2015 浏览 1 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

断肠人 2024-12-08 17:56:11

我遇到了同样的问题,并看到了对您问题的评论。
只是为了澄清起见:

https://sourceforge.net/apps/trac/sourceforge 上的指南/wiki/Git错误

不要从以下位置克隆/拉取/推送:

ssh://[电子邮件受保护]/gitroot/PROJECTNAME/REPONAME

相反,执行它来自:

ssh://[电子邮件受保护]/p/PROJECTNAME/重新命名

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:

ssh://[email protected]/gitroot/PROJECTNAME/REPONAME

Instead, do it from:

ssh://[email protected]/p/PROJECTNAME/REPONAME

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文