git config over http and ssh went wrong
- From
- Carlos S <neubyr@gmail.com>
- Date
- Jun 25, 2010, 16:28 UTC
- Message-ID
- <AANLkTimc_T6qS5zVo92F8lw7hNPFp-9BhLP_g4ojntlZ@mail.gmail.com>
Hi,
I need some help in setting up Git repository to be shared over ssh and http. I was able to share my server/public bare repository over ssh and http, but now client/private repositories are unable to push their changes. Would really appreciate any help on configuring both SSH and HTTP. And not sure why my SSH is not updating/pushing changes to server, as it did before. Any pointers on where I went wrong?
Here is what I did:
[server - public] * On CentOS5 - Git 1.7.1 server: -- Initialize bare git repo
[client - private SSH] * From another Debian VM: -- Create git repo -- Add remote origin ssh://user@centos5/var/gitpubrepos/test -- git push origin master
[server - public] * Then I changed HTTP conf to enable DAV for this directory.
[client - private HTTP] - May be I should have cloned the repo here
rather than pull?
* git init
Initialized empty Git repository in /ncs/tempgit-http/.git/
* git remote add origin http://centos5/git/fifa
* git pull
fatal: http://centos5/git/fifa/info/refs not found: did you run
git update-server-info on the server?[server - public] * git update-server-info
[client - private HTTP]
* git pull origin master
From http://centos5/git/fifa
branch master -> FETCH_HEAD
(Got all files)[client-private HTTP]
* Make some changes and try to push: git push
* git push
Fetching remote heads...
refs/
refs/tags/
refs/heads/
'refs/heads/master': up-to-date [client-private SSH]
* git push
= [up to date] master -> master
updating local tracking ref 'refs/remotes/origin/master'
Everything up-to-date-----
Thanks, CS.