I was able to setup Virtualbox with Gitlab using these instructions –> https://github.com/gitlabhq/gitlabhq/wiki/VirtualBox-Image. The web interface works just fine and I have added my host public key and created a ‘test’ project. However, I am unable to push to my test repository since it asks for git@33.33.33.10’s password after making a test directory and doing a ‘git init’. I have added my key and the web interface works just fine. Any ideas what could be wrong?
$ git remote add test git@33.33.33.10:test.git
$ git push -u test master
git@33.33.33.10's password: ...
I’ve tried this as well with the same results ( 2222 VM-side equals 22 Host-side):
git remote add test ssh://git@localhost:2222/test.git
git push -u test master
git@localhost's password:...
Should not require a password. I have also added the ‘vagrant’ user to the ‘git’ group on the VM.
I’ve verified that on the VM I am able to correctly receive the expected results below:
vagrant@lucid32:~$ ssh -T git@localhost
hello rails, this is gitolite v2.2-11-g8c4d1aa running on git 1.7.0.4
the gitolite config gives you the following access:
R W gitolite-admin
@R_ @W_ testing
Here is my VagrantFile:
Vagrant::Config.run do |config|
config.vm.box = "gitlab"
config.vm.network :hostonly, "33.33.33.10"
end
This has something to do with remote git pushing to virtualbox. Thanks for the help!
I did a brand new install using the gitlabhq_install scripts not in a virtual machine and had the original same issue. I was able to create a project and add my key via the web interface but could not push at all to a test repo. So I added my user (not the gitlabhq user) public ssh key by running “ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host” and restarted ssh. I still got the same issue so I ‘sudo vim /home/git/.ssh/authorized_keys’ and manually copied my key that was added with the above command to between the ‘#gitolite start/end’ tags. After resetting ssh only then was I able to finally push… now I am still scratching my head but at least it works I guess.