GitLab5.2 创建项目故障


今天在GitLab5.2上创建一个项目,然后参考网站的向导在开发机器上创建项目目录,最后运行

git push -u origin master

结果报错:

git push -u origin master
fatal: '/home/git/repositories/cloudengine/wtunnel.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

查了一下,权限没有问题。最后找到解决方案,原来是GitLab服务器上的/home/git/.ssh/authorized_keys文件的内容和GitLab网站保存的key不一致了。

解决方法是用root身份登录到gitlab server,进入/home/git/gitlab目录后,运行命令:

rake gitlab:shell:setup RAILS_ENV=production 

它会提示删除原来的authorized_keys文件内容,然后重新生成。

之后修改一下.ssh的用户和组的拥有者:

chown -R git /home/git/.ssh 

chgrp -R git /home/git/.ssh

然后重新启动gitlab。 过一会儿再试。

正常工作了。

GitLab 的详细介绍:请点这里
GitLab 的下载地址:请点这里

相关内容