【问题标题】:Asking for password when pushing to gitlab?推送到 gitlab 时要求输入密码?
【发布时间】:2016-07-20 02:05:39
【问题描述】:

我的笔记本电脑上有许多提交,我正在尝试通过 ShrewSoft VPN 将它们推送到 gitlab。但是,每次我尝试推送代码时,都会要求我在 git bash 中输入密码。我曾尝试使用我的 VPN 密码,但它只会引发错误。我昨天添加了我的 SSH 密钥,一切正常,但今天它无法正常工作,我不太清楚为什么!

关于密码应该是什么以及为什么首先要求我输入密码的任何想法?

谢谢。

【问题讨论】:

    标签: git bash ssh gitlab vpn


    【解决方案1】:

    密码是gitlab密码,看remote_url,

    git config --get remote.origin.url
    

    如果是类型

    git@github.com:jcjohnson/neural-style.git
    

    然后你应该检查你的本地 ssh 密钥是否在正确的位置: https://help.github.com/articles/checking-for-existing-ssh-keys/

    如果url是类型

    https://github.com/jcjohnson/neural-style.git
    

    你应该在 git 中设置你的全局用户和密码

    https://help.github.com/articles/why-is-git-always-asking-for-my-password/

    【讨论】:

    • 这很有帮助,谢谢!我刚刚添加了一个新的 SSH 密钥,它成功了!
    猜你喜欢
    • 2013-09-01
    • 1970-01-01
    • 2021-11-23
    • 2016-06-07
    • 2019-10-04
    • 2015-08-06
    • 2019-07-24
    • 2021-07-02
    • 1970-01-01
    相关资源
    最近更新 更多