Code-server: Git fatal error committing changes using username and password credentials

Created on 12 Mar 2019  路  7Comments  路  Source: cdr/code-server

  • code-server version: 1.31.1-100
  • OS Version: Linux Mint 19.1 Tessa - xfce - Kernel 4.15.0-46-generic

Description

I 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

Steps to Reproduce

  1. Click Source Control
  2. Enter a message for the commit (Ctrl+Enter to commit)
  3. Click Sync in ellipsis (...) menu of the Source Control tab
  4. Observe pop-up with previously mentioned error

Logs

Git log
Start script

bug

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 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.

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RealSlimMahdi picture RealSlimMahdi  路  3Comments

grant picture grant  路  3Comments

korzq picture korzq  路  3Comments

rcarmo picture rcarmo  路  3Comments

infogulch picture infogulch  路  3Comments