远程:找不到您要查找的项目或您没有查看该项目的权限

Bil*_*oui 4 deployment continuous-integration gitlab gitlab-ci cicd

我在尝试通过 gitlab 部署我的分支时收到此错误。

remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.com/[group_name]/[repo_name].git/' not found
error: Could not fetch origin
Run Code Online (Sandbox Code Playgroud)

Bil*_*oui 9

我设法解决了我的问题。如果您遇到同样的问题,请按照以下步骤操作:

  • 重命名您的旧远程跟踪:

git remote rename origin old_origin

  • 添加新的遥控器:

git remote add origin https://[gitlab_username]@gitlab.com/[group_name]/[repo_name].git

  • 您可能还必须将默认遥控器设置为 origin :

git config --add checkout.defaultRemote origin

  • 最后,如果需要,您可以删除 old_origin (可选)。