问题现象
git checkout 远程分支时 出校报错,报错信息为error: pathspec 'origin/release_**' did not match any file(s) known to git
并且使用git fetch 拉取所有分支的更新命令出现以下报错
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.vdian.net/**/**.git/'
这样是本地账号被服务端拒绝了
问题原因是在服务端修改了账号,本地没有更新
问题解决方法
用下面的命令:
git config --system --unset credential.helper 需要sudo权限
执行命令后,再次输入 git fetch 命令之后会出让输入新的账号和密码
这样再次拉取就是最新的问题了。