-
Notifications
You must be signed in to change notification settings - Fork 6.3k
-
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?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 3 replies
-
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?
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.