GitLab6.3.1新建项目无法push的问题解决

最近在创建仓库时候(我使用的是Gitlab6.3.1的老版本),出现如下问题:
*fatal: '/xxx/repositories/ablettchen/appmoduleres.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.
*
一、具体描述:
新建仓库,初始化,创建README文件。。。如下截图
GitLab6.3.1新建项目无法push的问题解决

以上步骤,执行命令均执行成功,接下来在执行git push时,如下:
GitLab6.3.1新建项目无法push的问题解决

二、解决办法思路
1)检查ssh_key是否配置?配置了是否正确?
2)用户是否已添加到项目中,以获的对应权限?
3)尝试重新创建项目
4)网络中搜寻其它人的解决办法
以上配置都是正确的,也有对应权限,其它尝试也失败了!!!

这时想到
创建了项目后,在服务器中,gitlab服务对应repositories目录下,应该存在相应的 "app_module_res.git" 文件夹,于是登录服务器查看,此时发现只有一个app_module_res.wiki.git,还差一个app_module_res.git,那么直接copy一份,是否可行?(注意目录权限)
尝试一下

cp -r app_module_res.wiki.git app_module_res.git
chown git.git -R app_module_res.git

此时,再次执行git push -u origin master ,问题解决!

备注:appmoduleres.wiki.git文件夹可能是在网络中搜寻解决办法时候创建的?不得而知。

按照以上思路,就算是这俩目录都没有,那么,也可以利用其它项目中的.git目录来创建需要的.wiki.git和.git目录,应该会麻烦些,里边有config等文件是否需要修改,大家自己验证下吧。

猜你喜欢

转载自blog.51cto.com/darui/2497415
今日推荐