mgit push -u origin "master"报错显示 Missing or invalid credentials.解决办法
问题:
新建了一个仓库之后,add和commit都成功了,最后的push失败了
git add .
git commit -m "first commit"
在这两步之后进行Push操作报错
git push -u origin "master"
报错如下:
root@user:/root/test# git push -u origin "master"
Missing or invalid credentials.
Error: connect ECONNREFUSED /run/user/0009/vscode-git-3f9f96e71.sock
at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1166:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/run/user/0009/vscode-git-3f9f96e71.sock'
}
Missing or invalid credentials.
Error: connect ECONNREFUSED /run/user/0009/vscode-git-3f9f96e71.sock
at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1166:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '/run/user/0009/vscode-git-3f92f9e71.sock'
}
remote: [session-68435293] Unauthorized
fatal: Authentication failed for 'https://gitee.com/zHh/test.git/'
解决办法
1、我是在vscode终端里面上传的,push失败,解决方法:设置(ctrl+,)
2\再直接搜索“git.terminalAuthentication”,并将该复选框前的对钩取消掉
3、(Ctrl+Shift+P)快捷键打开命令面板,输入”Reload Window“,点击该命令重新加载窗口。
4、最后在git push origin main终于解决问题了