Sourceforge:"......似乎不是一个git存储库"

Dan*_*son 3 git sourceforge push repository

我已经在Sourceforge上开始了一个项目,主要是为了尝试它的工作原理.这是项目的链接:https://sourceforge.net/projects/tachikomawall/但是将源代码推送到项目对我来说不起作用.我正在尝试使用GIT.这是它返回的错误:

[18:09] matachi ~/Projects/htdocs/Tachikoma-Wall $ git push origin master
matachi@tachikomawall.git.sourceforge.net's password: 
fatal: '/gitroot/tachikomawall/code' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

以下是我在终端输入的一些行(我不认为我忘了什么):

[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 "matachi@users.sourceforge.net"
[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://matachi@tachikomawall.git.sourceforge.net/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
Run Code Online (Sandbox Code Playgroud)

我想根据错误消息我没有写正确的存储库名称.您可能已经理解,我之前没有使用过GIT,也没有真正理解它是如何工作的.

ale*_*tas 5

我有同样的问题,看到你的问题的评论.只是为了澄清:

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

不要克隆/拉/推:

SSH://USERNAME@PROJECTNAME.git.sourceforge.net/gitroot/PROJECTNAME/REPONAME

相反,从:

SSH://USERNAME@git.code.sf.net/p/PROJECTNAME/REPONAME