首页 > 其他分享 >git clone 私有仓库, 提示 "remote: Repository not found."

git clone 私有仓库, 提示 "remote: Repository not found."

时间:2024-06-12 15:45:05浏览次数:5  
标签:git remote Repository 仓库 clone github

现象

私有仓库, 已经在github里面关联了ssh pub key
但是尝试使用 git clone 将仓库克隆至本地时, 提示 "remote: Repository not found.", 如图
image

解决方法

改用 Access Token 获取

Github 去到 Setting -> Developer Settings -> personal access tokens -> generate new token 生成一个 token
针对对应的repo, 放行所需权限
随后使用 git clone https://<Token>@github.com/<USERNAME>/<REPO_NAME>.git 形式的命令来克隆

参考信息

补充、思考 & 疑惑

  • 是现在 Github 放弃使用 ssh key 方式了, 还是说我先前的操作里漏了步骤?
  • 网友说也可以不推荐使用 git clone https://<USERNAME>:<PASSWORD>@github.com/<USERNAME>/<REPO_NAME>.git 形式的命令来实现克隆
  • 如果你要在本地 commit, 仓库需要有 user.emailuser.name 信息

标签:git,remote,Repository,仓库,clone,github
From: https://www.cnblogs.com/tfel-ypoc/p/18244065

相关文章