我在测试服务器上有一个git主分支,路径为
testvps.subdomain.domain.com:~public_html/domain.com/ZendSkeletonApplication/
。现在我在同一台服务器上运行了Gitlab CentOS rpm,地址为http://testvps.subdomain.domain.com:8888。
将本地主库导入Gitlab
我需要将这个现有的本地仓库导入到Gitlab(请参见早期关于使用ssh克隆repo的问题here)。此仓库是主分支而不是原始分支源,原始分支源在Github上是ZendApplication。对于密码访问,Gitlab建议使用链接https://username:password@gitlab.com/company/project.git
。文档提到要将裸仓库复制到/home/git/。
最佳方法是什么?
用户git已经被添加,但是家目录似乎没有自动生成,可能需要手动创建 - 参见链接here。不确定是否需要正确导入。由于这是主分支,似乎需要不同的方法来导入现有的git仓库,它有20多个提交。也许我应该将主分支作为新的源?我该如何操作?更新
我已经将Gitlab .git仓库添加为新的远程仓库。git remote set-url origin git@testvps.sub.domain.com:root/repo.git
git remote -v
origin git@testvps.sub.domain.com:root/repo.git (fetch)
origin git@testvps.sub.domain.com:root/repo.git (push)
当我尝试推送内容时,会要求输入git用户的密码。
git push -u origin master
git@testvps.sub.domain.com's password:
我不需要它,也不应该需要它。我该如何解决这个问题?
PS sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
不起作用,因为它提到了缺少命令的bundle。