解决 git 出现 Your account has been blocked 问题


$ git push origin master
GitLab: Your account has been blocked.
fatal: Could not read from remote repository.

使用 git 出现以上报错,无法从远程 pull 代码下来。

解决方案:
git 提交时出现以上问题,只用重新设置下远程 url 即可

$ git re­mote set-url ori­gin git@yourhost.com:org/​pro­ject.git

我的情况是,公司同事离职,账户权限没了,所以需要更换账户。

git config --global user.name newname
git config --global user.email newemail

因为公司搭建的 git­lab 对 ssh 请求形式不支持,所以直接使用 http [s] 形式,将账号密码拼接在其内即可。

git remote set-url origin http://username:password@ip/project/xxx.git

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM