Gitlab push无法工作,pull可以完美工作

Gitlab push无法工作,pull可以完美工作,git,gitlab,Git,Gitlab,我有一个安装了gitlab并创建了一个项目的服务器。我修改了post-receive钩子,在这里我声明了工作树和git-repo。在那之后,我把我的项目克隆到我的本地机器上,一切都进行得很顺利。当我试着推的时候,我得到了下面的错误 git.exe push --progress "origin" master:master Counting objects: 10, done. Delta compression using up to 4 threads. Compressing objec

我有一个安装了gitlab并创建了一个项目的服务器。我修改了post-receive钩子,在这里我声明了工作树和git-repo。在那之后,我把我的项目克隆到我的本地机器上,一切都进行得很顺利。当我试着推的时候,我得到了下面的错误

git.exe push --progress "origin" master:master

Counting objects: 10, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (10/10), 1.35 KiB | 0 bytes/s, done.
Total 10 (delta 3), reused 0 (delta 0)
remote: GitLab: The project you were looking for could not be found.
To ssh://server/path/repo.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@server/path/repo.git'


git did not exit cleanly (exit code 1) (6240 ms @ 11/23/2016 2:35:10 PM)
上面说找不到这个项目,但我能把它拉出来。Gitlab和repo位于同一台服务器上


如果有人有任何修复方法,我们将不胜感激。

看来您的远程地址不好。您可以使用

git remote show origin
它必须看起来像:

Push  URL: git@<address>:<project>/<repository_name>.git

正确的地址将出现在Gitlab项目页面中。您可以使用git help remote

更改存储库的权限来查找更多信息

转到设置->权限

单击展开

然后将项目可见性更改为


内部公共

为此,我必须创建一个个人访问令牌

一旦您有了令牌,就可以在通过HTTPS执行Git操作时输入它而不是密码

例如:

您能显示git remote-v的结果吗?您要推送到的URL看起来很奇怪。您使用的是什么Gitlab版本?看起来真的ancient@das_jGitLab社区版8.13。6@Collin是同一个url,该命令希望在推送和拉送url上看到基本事实。GitLab通常不会像那样通过完整路径引用存储库。我尝试过这样做,但收到了致命的错误:无法查找git://gitlab_project_path (端口9418)(在数据库查找过程中发生不可恢复的错误。如果gitlab数据库配置有问题,请检查
git remote set-url origin git://new.url.here