We have git repo at github (  and would like to move onto some our corporate box inside our network, for example on internal.bokov.net. This repository is shared for group of developers and all who have ssh access onto internal.bokov.net shall have right to commits onto git repository. So first of all prepare place for git repo at new hosting :

ssh user@internal.bokov.net
cd var
mkdir git_repo
chmod 777 git_repo
cd git_repo
mkdir my_project
cd my_project
git init --bare --shared=all
cd objects
chmod g+ws *

Next clone existing repo and change its settings to point onto internal.bokov.net

git clone --bare git@github.com:bokov/github_project.git
git remote add -t master -m master origin ssh://internal.bokov.net/var/git_repo/my_project/
git push origin master

to start work with new repo just use

git clone ssh://internal.bokov.net/var/git_repo/my_project/

have fun.

One Comment

  1. Vic says:

    I haven’t fun. It’s doesn’t work for me. I’ve received error message: “fatal: The remote end hung up unexpectedly” when i tried to ‘git clone’


Leave a Reply