proxytoworld
V2EX  ›  问与答

为什么在 vscode 的 wsl terminal 可以成功 git push,在 wt 中登录 wsl git push 却要身份验证(已经在 github 配置了证书)

  •  
  •   proxytoworld · Sep 19, 2022 · 2191 views
    This topic created in 1509 days ago, the information mentioned may be changed or developed.

    如题,在 vscode 的 wsl terminal 可以成功 giut push ,wt 用 wsl -u user 却不能 git push

    用 git config --list --show-origin 展示的 config 都一样

    难道 vscode 注入了一些变量?

    9 replies  •  2022-09-20 08:38:57 +08:00
    liubaicai
    liubaicai
    Sep 19, 2022
    1
    wt 是什么
    proxytoworld
    proxytoworld
    OP
    Sep 19, 2022
    2
    @liubaicai windows terminal
    DawnMoon
    DawnMoon
    Sep 19, 2022❤️1
    3
    你看下是不是因为你用了 https 协议来 push 代码。另外在 GitHub 配置证书是啥意思?是公钥吗? https 是不能用 ssh 的密钥对的。
    dem0ns
    dem0ns
    Sep 19, 2022
    4
    windows 的私钥和 wsl 的私钥位置不一样

    C:\Users\xxx\.ssh\
    ~/.ssh/
    proxytoworld
    proxytoworld
    OP
    Sep 19, 2022
    5
    @villivateur 都是 git push ,在 vscode 和 wt 里面走的不是同一个协议吗
    dem0ns
    dem0ns
    Sep 19, 2022
    6
    而且你这用的是 https ,是用的密码认证
    proxytoworld
    proxytoworld
    OP
    Sep 19, 2022
    7
    @dem0ns 都在 wsl 里面
    cweijan
    cweijan
    Sep 20, 2022
    9
    哥们, 你用的是 https, 就是需要输入密码的, 你用 vscode 不用密码是因为凭据被记住了, 你试下在 wsl 里面配置
    `git config --global credential.helper store`
    输入密码一次后应该就不用再输入的, 和你配不配置证书没关系.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   935 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 20:11 · PVG 04:11 · LAX 12:11 · JFK 15:11
    ♥ Do have faith in what you're doing.