作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我已经在 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
这是我之前在终端中输入的一些行(我想我没有忘记任何内容):
[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
我根据错误信息猜测是我没有写正确的仓库名。如您所知,我以前没有使用过 GIT,也不太了解它是如何工作的。
最佳答案
我遇到了同样的问题,看到了对你问题的评论。只是为了澄清起见:
指南 https://sourceforge.net/apps/trac/sourceforge/wiki/Git是错误的。
不要克隆/pull/推:
ssh://USERNAME@PROJECTNAME.git.sourceforge.net/gitroot/PROJECTNAME/REPONAME
相反,从以下位置开始:
ssh://USERNAME@git.code.sf.net/p/PROJECTNAME/REPONAME
关于git - 来源: "... does not appear to be a git repository",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7207852/
我是一名优秀的程序员,十分优秀!