zoukankan      html  css  js  c++  java
  • git clone 提示输入git@xxx的密码

    如下:

    suse:~/ecox # git clone git@vcs.in.ww-it.cn:ecox/ecox.git
    正克隆到 'ecox'...
    git@vcs.in.ww-it.cn's password:
    

     但是我都不知道密码是啥,跟登录git库的密码不一样。

    然后使用http的方式,报一个错误:

    use:~/ecox # git clone https://vcs.in.ww-it.cn/ecox/ecox.git
    正克隆到 'ecox'...
    fatal: unable to access 'https://vcs.in.ww-it.cn/ecox/ecox.git/': SSL certificate problem: unable to get local issuer certificate
    

    提示SSL证书错误。发现说这个错误并不重要是系统证书的问题,系统判断到这个行为会造成不良影响,所以进行了阻止,只要设置跳过SSL证书验证就可以了,那么用命令 :

     git config --global http.sslVerify false
    

    然后可以了,但是还是会要用户名和密码:

    suse:~/ecox # git clone https://vcs.in.ww-it.cn/ecox/ecox.git
    正克隆到 'ecox'...
    Username for 'https://vcs.in.ww-it.cn': xxx
    Password for 'https://xxx@vcs.in.ww-it.cn':
    remote: HTTP Basic: Access denied
    fatal: Authentication failed for 'https://vcs.in.ww-it.cn/ecox/ecox.git/'
    

    回到了老问题,于是想到设置git账户的密码,改一下试试?

    在准备改密码的过程中,发现用户下面可以配置ssh-key,于是尝试配一下ssh-key来让ssh信任:

    use:~/ecox # ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/root/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    

    最后果然不需要再输入密码了,成功clone项目,所以在这里记录一下,方便以后查阅。

  • 相关阅读:
    高性能网站优化-确保异步加载脚本时保持执行顺序
    sublime安装和汉化
    解决IE6下a标签的onclick事件里的超链接不跳转问题
    C++大数据处理
    HDRtools-OpenExr
    Effective C++学习进阶版
    我的算法学习之路
    一个应届计算机毕业生的2012求职之路
    存储器管理
    程序员的自我修养——操作系统篇
  • 原文地址:https://www.cnblogs.com/kuang17/p/9676065.html
Copyright © 2011-2022 走看看