您的位置:首页 > 其它

GitLab5.2 创建项目故障

2013-06-26 17:10 267 查看
今天在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。 过一会儿再试。正常工作了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: