当前位置:   article > 正文

remote: GitLab: You are not allowed to push code to this project._> git push origin main:main remote: gitlab: you ar

> git push origin main:main remote: gitlab: you are not allowed to push code

今天在公司fork代码后,用git提交代码到内网的gitlab上,一直遇到以下报错:


  1. $ git push origin testing
  2. Counting objects: 5, done.
  3. Delta compression using up to 2 threads.
  4. Compressing objects: 100% (5/5), done.
  5. Writing objects: 100% (5/5), 424 bytes | 0 bytes/s, done.
  6. Total 5 (delta 4), reused 0 (delta 0)
  7. remote: GitLab: You are not allowed to push code to this project.
  8. To http://10.199.192.11/louis/xxx.git
  9.  ! [remote rejected] testing -> testing (pre-receive hook declined)
  10. error: failed to push some refs to 'http://10.199.192.11/louis/xxx.git'


折腾了很久,也找了很多资料都没有解决。后来在一篇英文资料(原文 https://gitlab.com/gitlab-com/support-forum/issues/207)中找到解决方案,简单说下解决步骤:

进入“控制面板” => "用户帐户" => "管理您的凭证" => "Windows凭据 / 普通凭据" ,到此发现在普通凭据中有多个git凭证,确认后发现有错误的凭证,修改后就能顺利的push代码了。


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/184564?site
推荐阅读
相关标签
  

闽ICP备14008679号