git clone提示:remote: The project you were looking for could not be found.

博客主要讲述运行git clone拉取项目代码时出现'repository not found'错误的问题。解决方法一是在仓库地址前添加用户名和密码,但密码含'@'时命令会失败;二是仅在仓库地址前添加用户名,回车后输入密码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题现象:

运行git clone拉取项目代码时候提示:

remote: The project you were looking for could not be found.

fatal: repository 'https://gitlab.demo.com/product/gitlab-instance-d8c9751f/devops.git/' not found

$ git clone --progress -v "https://gitlab.demo.com/product/gitlab-instance-d8c9751f/devops.git"  "D:\project\screen"
Cloning into 'D:\project\screenporta'...
remote: The project you were looking for could not be found.
fatal: repository 'https://gitlab.demo.com/product/gitlab-instance-d8c9751f/devops.git/' not found

解决方法:

在仓库地址前添加用户名和密码即可,方法如下:

  1. 仓库地址前添加用户名和密码,这种方式有个小问题。如果密码带“@”,命令将运行失败。

$ git clone "https://username:password@xxx.com/console/project.git"

  1. 仓库地址前仅添加用户名,回车后会弹出密码输入框。输入即可。

$ git clone "https://username@xxx.com/console/project.git"

示例:

$ git clone --progress -v "https://spring@gitlab.demo.com/gitlab-instance-d8c9751f/devops.git"  "D:\project\screen"
Cloning into 'D:\project\screen'...
POST git-upload-pack (275 bytes)
remote: Enumerating objects: 57, done.
remote: Counting objects: 100% (57/57), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 721 (delta 33), reused 0 (delta 0), pack-reused 664
Receiving objects: 100% (721/721), 2.61 MiB | 2.13 MiB/s, done.
Resolving deltas: 100% (220/220), done.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值