记录 git 无法推送远程

2,014 阅读1分钟

修改了gitlab 上的账号密码,项目就无法推送远程了,报错403 令牌失效,耽误了几个小时记录一下

Missing or invalid credentials.
Error: socket hang up
    at connResetException (internal/errors.js:559:14)
    at Socket.socketOnEnd (_http_client.js:433:23)
    at Socket.emit (events.js:208:15)
    at endReadableNT (_stream_readable.js:1168:12)
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  code: 'ECONNRESET'
}
remote: HTTP Basic: Access denied
fatal: Authentication failed for

1.修改账号密码

git config --global user.name "your name"
git config --global user.email "your email"
  // 下面也可以
git config --global --replace-all user.email "your email" 
git config --global --replace-all user.name "your name"

2.查看帐号密码

git config user.name
git config user.email
git config user.password

3.实在不行 重新克隆项目