美文网首页
Missing or invalid credentials.报

Missing or invalid credentials.报

作者: DSuperLu | 来源:发表于2020-12-07 17:03 被阅读0次

    设置账号,通过http克隆代码

    git config --global user.name "xxx"
    git config --global user.email "xxx.com"
    git clone http:// XXX
    

    报错

    Missing or invalid credentials.
    Error: socket hang up
        at connResetException (internal/errors.js:570:14)
        at Socket.socketOnEnd (_http_client.js:440:23)
        at Socket.emit (events.js:228:7)
        at endReadableNT (_stream_readable.js:1185:12)
        at processTicksAndRejections (internal/process/task_queues.js:81:21) {
      code: 'ECONNRESET'
    }
    Missing or invalid credentials.
    Error: socket hang up
        at connResetException (internal/errors.js:570:14)
        at Socket.socketOnEnd (_http_client.js:440:23)
        at Socket.emit (events.js:228:7)
        at endReadableNT (_stream_readable.js:1185:12)
        at processTicksAndRejections (internal/process/task_queues.js:81:21) {
      code: 'ECONNRESET'
    }
    remote: HTTP Basic: Access denied
    fatal: Authentication failed for 'http://gitlab.xxx.git/'
    

    使用ssh克隆代码
    新仓库没有ssh,创建ssh key

    ssh-keygen -t rsa -b 4096 -C "你的邮箱"   
    

    一路回车

    打开ssh文件夹
    执行:open /Users/xxx/.ssh
    复制 rsa.pub中的内容
    放到gitlab中
    克隆ssh
    成功

    相关文章

      网友评论

          本文标题:Missing or invalid credentials.报

          本文链接:https://www.haomeiwen.com/subject/jnmswktx.html