VS Code – cannot rebase from terminal

If you receive error on rebase in terminal like

Unable to connect to VS Code server: Error in request.
Error: connect ENOENT /run/user/1000/vscode-ipc-5cc265b0-6bec-4e0e-99c7-8fc48bccd7c4.sock
    at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'connect',
  address: '/run/user/1000/vscode-ipc-5cc265b0-6bec-4e0e-99c7-8fc48bccd7c4.sock'
}

Run

loginctl enable-linger $(whoami) 

It can show error and after creating dir /run/user/1000 with previous command, this can be corrected with setting correct env var VSCODE_IPC_HOOK_CLI

export VSCODE_IPC_HOOK_CLI=$(lsof | grep $USER | grep vscode-ipc | awk '{print $(NF-1)}' | head -n 1)

Link

Leave a comment

Your email address will not be published. Required fields are marked *