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

os.getlogin problem #7

Open
a2902793 opened this issue Aug 24, 2019 · 1 comment
Open

os.getlogin problem #7

a2902793 opened this issue Aug 24, 2019 · 1 comment

Comments

@a2902793
Copy link

First time running dockersh -t after fresh install will give

Traceback (most recent call last): File "/usr/local/bin/dockersh", line 22, in <module> user = os.getlogin() FileNotFoundError: [Errno 2] No such file or directory

found a workaround from some other github issue and stackoverflow answer suggesting to replace os.getlogin in line 22 of dockersh to

import pwd
import os

getlogin = lambda: pwd.getpwuid(os.getuid())[0]
user = getlogin()

this will only eliminate the error above and will ran into the issue #5 ...
any suggestions on how to make the whole dockersh working?

@tr4c3datr4il
Copy link

First time running dockersh -t after fresh install will give

Traceback (most recent call last): File "/usr/local/bin/dockersh", line 22, in <module> user = os.getlogin() FileNotFoundError: [Errno 2] No such file or directory

found a workaround from some other github issue and stackoverflow answer suggesting to replace os.getlogin in line 22 of dockersh to

import pwd
import os

getlogin = lambda: pwd.getpwuid(os.getuid())[0]
user = getlogin()

this will only eliminate the error above and will ran into the issue #5 ... any suggestions on how to make the whole dockersh working?

Hi, although today is 2023 now but it's never too late to do this:
echo $UID > /proc/self/loginuid
Use this command in your terminal :D

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

No branches or pull requests

2 participants