git clone: I get a strange authentication error

Viewed 7944

I'm admin in a private github repo. Since this morning, when I try to clone that repo I get:

git clone https://github.com/myblabla/blabla.git
Cloning into 'blabla'...
Missing or invalid credentials.
Error: connect ENOENT /run/user/1000/vscode-git-fa9d1b661a.sock
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) {
  errno: 'ENOENT',
  code: 'ENOENT',

  syscall: 'connect',
  address: '/run/user/1000/vscode-git-fa9d1b661a.sock'
}
Missing or invalid credentials.
Error: connect ENOENT /run/user/1000/vscode-git-fa9d1b661a.sock
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'connect',
  address: '/run/user/1000/vscode-git-fa9d1b661a.sock'
}
remote: Repository not found.
fatal: Authentication failed for 

I never had that before. What's the fix?

When I do:

ssh -T git@github.com

I get:

git@github.com: Permission denied (publickey).
4 Answers

Try to open a new terminal in your VSCode, this may solve your problem.

Apparently, it's vscode's virtual terminal Easter egg. When I type the git clone command in a proper terminal (not the emulator in vs), it works as usual.

I had this problem, it was caused by me using a terminal multiplexor on my Linux machine, connecting to it via VSCode's remote SSH and then trying to commit from a regular SSH connection which was also connecting through the terminal multiplexor.

Logging out the multiplexor reset things.

So be careful if you're using something like Tmux on the remote machine and access it inside the VSCode terminal, it seems to confuse git.

I overcame this problem by doing what I was trying to do from the terminal instead.

For me, it was an authentication error due to something with VSCode.

I faced the same problem earlier today.

Related