解决 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

 

posted @ 2019-11-21 14:35  海滨擎蟹  阅读(7474)  评论(0编辑  收藏  举报