V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
TomVista
V2EX  ›  问与答

诡异的 git 权限问题

  •  
  •   TomVista · 2022-09-02 20:36:18 +08:00 · 470 次点击
    这是一个创建于 842 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    PS D:\dev> ssh -T [email protected]
    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 [email protected]:TomVista/markdown-html.git
    Cloning into 'markdown-html'...
    [email protected]: 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.
    
    Monad
        1
    Monad  
       2022-09-03 00:23:29 +08:00 via iPhone
    检查一下私钥权限
    TomVista
        2
    TomVista  
    OP
       2022-09-03 09:31:36 +08:00
    @Monad
    找到问题了

    git 命令使用的 shh 和 powershell >ssh 不是一个 .
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1602 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 16:33 · PVG 00:33 · LAX 08:33 · JFK 11:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.