我试图将我的本地分支代码推送到新存储库的主节点。这些是Gitlab存储库。但是我一直收到此错误-
远程:您 (@user( 必须接受服务条款才能执行此操作。请从网络浏览器访问 GitLab 以接受这些条款。致命:无法访问"https://gitlab.com/project/project-ios.git/":请求的 URL 返回错误:403
@user不是我。我不知道发生了什么。
我提交了我的本地分支,在 gitlab 上打开另一个遥控器并在终端上写入
git push https://gitlab.com/new_project/new_project-ios +local_branch:master
我在这里找到的!
@user的人在我之前正在处理不同的存储库。我正在使用的存储库是几个月前创建的,此人未添加为成员。
@user不是我
这意味着本地 Git 安装必须使用缓存"user"凭据的凭据帮助程序
git config credential.helper
您可以:
- 使用 SSH URL (
git remote set-url origin git@gitlab.com:new_project/new_project-ios
(,前提是您已将 SSH 密钥注册到 GitLab 帐户 或删除凭据:
git credential-manager reject gitlab.com
(在 MacOS 上:请参阅"管理遥控器/从 OSX 钥匙串更新凭据"从 OSX 钥匙串更新凭据"(