诡异的 git 权限问题

2022-09-02 20:36:18 +08:00
 TomVista

有权限 ssh 就是拉不下来代码

PS D:\dev> ssh -T git@github.com
Warning: Permanently added the ED25519 host key for IP address '198.18.0.4' to the list of known hosts.
Hi TomVista! You've successfully authenticated, but GitHub does not provide shell access.
PS D:\dev> git clone git@github.com:TomVista/markdown-html.git
Cloning into 'markdown-html'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
PS D:\dev> git clone https://github.com/TomVista/markdown-html.git
Cloning into 'markdown-html'...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 25 (delta 2), reused 25 (delta 2), pack-reused 0
Receiving objects: 100% (25/25), 6.82 KiB | 6.82 MiB/s, done.
Resolving deltas: 100% (2/2), done.
386 次点击
所在节点    问与答
2 条回复
Monad
2022-09-03 00:23:29 +08:00
检查一下私钥权限
TomVista
2022-09-03 09:31:36 +08:00
@Monad
找到问题了

git 命令使用的 shh 和 powershell >ssh 不是一个 .

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/877333

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX