'Why I'm getting Error: connect ENOENT from vscode on git push origin

I'm getting an error when trying to push to github from vscode terminal.

    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1134:16) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'connect',
  address: '/run/user/1000/snap.code/vscode-git-0e219c7318.sock'
}
Missing or invalid credentials.
Error: connect ENOENT /run/user/1000/snap.code/vscode-git-0e219c7318.sock
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1134:16) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'connect',
  address: '/run/user/1000/snap.code/vscode-git-0e219c7318.sock'
} ``` 
This is only happening in vscode terminal cause if I use a different one I dont have this, any solution for this?


Solution 1:[1]

Try it later, I think it's an error conection, it happened to me. I wait a couple of minutes and I could push.

Solution 2:[2]

It's a problem of VSC have a look at here. Try to push from console instead.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rpjs
Solution 2 rpjs