我能够使用这些说明使用 Gitlab 设置 Virtualbox --> https://github.com/gitlabhq/gitlabhq/wiki/VirtualBox-Image。Web 界面工作得很好,我已经添加了我的主机公钥并创建了一个“测试”项目。但是,我无法推送到我的测试存储库,因为它在创建测试目录并执行“git init”后要求输入 git@33.33.33.10 的密码。我已经添加了我的密钥,并且网络界面工作正常。有什么想法可能是错的吗?
$ git remote add test git@33.33.33.10:test.git
$ git push -u test master
git@33.33.33.10's password: ...
我也尝试过,结果相同(2222 VM 端等于 22 主机端):
git remote add test ssh://git@localhost:2222/test.git
git push -u test master
git@localhost's password:...
不应该需要密码。我还将 'vagrant' 用户添加到 VM 上的 'git' 组。
我已经验证在 VM 上我能够正确收到以下预期结果:
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
这是我的流浪文件:
Vagrant::Config.run do |config|
config.vm.box = "gitlab"
config.vm.network :hostonly, "33.33.33.10"
end
这与远程 git 推送到 virtualbox 有关。谢谢您的帮助!