code-server version: 1.31.1-100Linux Mint 19.1 Tessa - xfce - Kernel 4.15.0-46-genericI run a private git server (Bonobo), that requires username/password credentials for access. When I click Sync in the Source Control menu, I receive the following pop-up error:
Git: fatal: cannot run /home/travis/build/codercom/code-server/packages/server/build/extensions/git/dis/askpass.sh: No such file or directory
Git was installed using sudo apt-get install git
I'm running the server with a bash shell script as a service:
./code-server /projects --allow-http --password=password --port=8443 --data-dir=/code-server-data
I had the same issue. If you're running with a docker container you can just update your image, as git is now included. Otherwise, run git config --global credential.helper cache and manually do a git pull/clone/etc (from the cli) where you'll have to enter your password. Once you do that, git operations in the GUI should work.
Unfortunately I'm not running Docker, but I think you just saved the day. I'll give that a try and come back with my findings.
Thanks!
Im just mounting my ssh keys and .gitconfig like this from host box:
docker run -d \
-p 3002:8443 \
--name "code-server" \
--restart always \
-e PASSWORD='SuperSecret' \
-v /mnt/480g_drive/projects:/home/coder/project \
-v /mnt/1tb_drive/dockers/code-server/settings:/home/coder/.local/share/code-server \
-v /mnt/480g_drive/projects/dotfiles/home-srv/.gitconfig:/home/coder/.gitconfig \
-v /home/lognato/.ssh/authorized_keys:/home/coder/.ssh/authorized_keys \
-v /mnt/480g_drive/projects/dotfiles/home-srv/.ssh/config-coder:/home/coder/.ssh/config \
-v /home/lognato/.ssh/keys-work:/home/coder/.ssh/keys-work \
-v /home/lognato/.ssh/keys-personal:/home/coder/.ssh/keys-personal \
-v /home/lognato/.ssh/known_hosts:/home/coder/.ssh/known_hosts \
codercom/code-server --allow-http
It is ugly - yah. But then git fucntionality just works with ssh keys.
If this still occurs please feel free to reopen.
@nhooyr This issue still occurs in v1.41.1.
We are running Code Server in a Docker container.
When running a Git command, e.g.:
cmd+shift+p
>Git: Pull
the following error occurs:
fatal: cannot run /drone/src/build/code-server2.1698-vsc1.41.1-linux-x86_64-built/extensions/git/dist/askpass.sh: No such file or directory
fatal: could not read Username for 'https://our.git-server.tld': No such device or address
It is possible to bypass the error by using a credential helper or SSH keys, but this is only a workaround and we would be really happy if the Password prompt would work like expected.
Very weird. @code-asher
Good catch. Should be fixed with #1306.
Most helpful comment
I had the same issue. If you're running with a docker container you can just update your image, as git is now included. Otherwise, run
git config --global credential.helper cacheand manually do a git pull/clone/etc (from the cli) where you'll have to enter your password. Once you do that, git operations in the GUI should work.