Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git fatal error committing changes using username and password credentials #208

Closed
scottpage opened this issue Mar 12, 2019 · 7 comments · Fixed by #1338
Closed

Git fatal error committing changes using username and password credentials #208

scottpage opened this issue Mar 12, 2019 · 7 comments · Fixed by #1338
Labels
bug Something isn't working

Comments

@scottpage
Copy link

scottpage commented Mar 12, 2019

  • 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

@scottpage scottpage added the bug Something isn't working label Mar 12, 2019
@gorbypark
Copy link

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.

@scottpage
Copy link
Author

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!

@linuxd3v
Copy link

linuxd3v commented Aug 1, 2019

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.

@nhooyr
Copy link
Contributor

nhooyr commented Jan 28, 2020

If this still occurs please feel free to reopen.

@nhooyr nhooyr closed this as completed Jan 28, 2020
@2manyvcos
Copy link

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

@nhooyr nhooyr reopened this Feb 26, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Feb 26, 2020

Very weird. @code-asher

@kylecarbs
Copy link
Member

Good catch. Should be fixed with #1306.

@code-asher code-asher mentioned this issue Feb 28, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants