Sourceforge: “… does not appear to be a git repository”

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
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

Here are some lines that I typed in the terminal before (I don’t think I forgot anything):

  • Git - deleted some files locally, how do I get them from a remote repository
  • bashrc alias for not confusing git and mercurial
  • The way to “reinit” repository
  • Grunt-shell save command output as variable
  • Search through git revisions for method call
  • How can I mark a group of changes/changesets in SVN, Hg, or Git
  • [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
    

    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.

  • Should I merge master into a branch, and then merge back into master?
  • GitPython: how to commit updated submodule
  • How to interactively add files in Perforce (equivalent of `git add -p`)
  • post-receive hook permission denied “unable to create file” error
  • Using Git to keep different versions of a file locally vs. in the master repository
  • visual studio git non-vs projects
  • One Solution collect form web for “Sourceforge: “… does not appear to be a git repository””

    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://USERNAME@PROJECTNAME.git.sourceforge.net/gitroot/PROJECTNAME/REPONAME

    Instead, do it from:

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

    Git Baby is a git and github fan, let's start git clone.