Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unable to git clone with code-server #7311

Unanswered
okyspace asked this question in General
Discussion options

Hi,

I have a pod running the container with uid=1000, serving the code-server.
When I attempts to run the Terminal, the Terminal did not launch successfully, with error stating that The Terminal process "/sbin/nologin" failed to launch (exit code: 1).

I further tried adding bash as the default terminal profile on Linux, the Terminal launched. But git clone stuck at "Clonining into ....". Apparently, it cannot return the command to ask for user and password.

I also found that the uid 1000 is /sbin/nologin in /etc/passwd, which seems to be the issue.
Any advice how to get it working without root user?

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

How is the user created in your container? Does it use useradd or chsh? You could add a chsh to change the shell as part of the container init but probably better to edit the original commands that are setting the shell to /sbin/nologin in the first place.

As for the clone, are you able to use SSH keys instead?

But, not popping up a prompt to ask for the username/password could be a bug. How exactly do you clone it? Using the UI or the integrated terminal?

You must be logged in to vote
3 replies
Comment options

I have a dockerfile which I have used RUN useradd -ms /bin/bash coder.
'coder' has been added with /bin/bash in /etc/passwd. Now the embedded terminal can be launched.

As for the git clone, I was doing a typical git clone https://github.com/<my repo>.git.
With the "coder" added, the same issue still persist. I am using code-server v4.99.1.

Comment options

I added GIT_TRACE=1 and did the git clone..
This is where it got stuck.
trace: run_command: /usr/lib/code-server/lib/vscode/extensions/git/dist/askpass.sh ‘Username for <gitlab url>:

No prompt for username after that.

Comment options

A workaround might be to unset GIT_ASKPASS so it asks in the terminal.

Do you see any errors on code-server's side? I think it would be in the extension host logs, since this is handled by the builtin git extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /