2

I set up access to git over apache2 and the git-http-backend as described in http://www.tikalk.com/alm/setup-git-gitweb-git-http-backend-smart-http-ubuntu-1204 . I can pull from the test repository which already exists remotely.

I have however hard time pushing a repository I created locally to the remote server such that a new repository is set up there. I am a beginner with git, so I might be missing something obvious.

I create a test repository like this:

mkdir test2 cd test2 git init . echo blah > foo.txt git add . git commit -m'initial commit' 

I try this:

git push http://myserver/git/test2.git fatal: repository 'http://myserver/git/test2.git/' not found 

or this:

git push --set-upstream http://myserver/git/test2.git master fatal: repository 'http://myserver/git/test2.git/' not found 

Any hint?

4
  • Git 'push' will not create new repository on the remote. You must initialize it by git init --bare. See here Commented May 18, 2014 at 2:05
  • In another words, there is way (can be something else than push) to get the repo to the remote without ssh'ing there? I am migrating away from bzr and this is something it trivially supports. Commented May 18, 2014 at 11:18
  • Did you mean git command like bzr init-repo? Commented May 18, 2014 at 13:28
  • I mean something like bzr push https+webdav://myserver/bzr/new-repo which pushes the branch to the new-repo which perhaps does not exist yet. Or to create a remote repo, I was able to do bzr init https+webdav://myserver/bzr/new-repo (running that command locally, creating the repo remotely). Commented May 18, 2014 at 14:26

1 Answer 1

0

You can't instantiate a remote Git repository over the Git protocol.

You can use Gitorious, or a similar web interface, where you can create a remote repository. Git Web was installed in your tutorial but I assume it can't create a repository since you haven't found that feature.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.