# git config over http and ssh went wrong

2 messages from 2010-06-25 to 2010-06-25. Participants: Carlos S.
Thread: https://gitlist.dev/t/24197

## Carlos S, 2010-06-25 16:28

Subject: git config over http and ssh went wrong
Message-ID: <AANLkTimc_T6qS5zVo92F8lw7hNPFp-9BhLP_g4ojntlZ@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimc_T6qS5zVo92F8lw7hNPFp-9BhLP_g4ojntlZ%40mail.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.

```

## Carlos S, 2010-06-25 18:08

Subject: Re: git config over http and ssh went wrong
Message-ID: <AANLkTilui6O9dNk1D5BaIFZUVKi2ByuYeMw0hkfxVRcn@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTilui6O9dNk1D5BaIFZUVKi2ByuYeMw0hkfxVRcn%40mail.gmail.com
In-Reply-To: <AANLkTimc_T6qS5zVo92F8lw7hNPFp-9BhLP_g4ojntlZ@mail.gmail.com>

```
It's working fine. I forgot to add-commit my changes after file modification.

--
CS.

On Fri, Jun 25, 2010 at 11:28 AM, Carlos S <neubyr@gmail.com> wrote:
> 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.
>

```
