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

Problems using server #7

Closed
xxlbug opened this issue Jan 15, 2023 · 2 comments
Closed

Problems using server #7

xxlbug opened this issue Jan 15, 2023 · 2 comments

Comments

@xxlbug
Copy link

xxlbug commented Jan 15, 2023

Hello again ;-)

now my server is up an running and i can connect. BUT i can't clone any repos. In essence i think i overlooked something obvious with my tinkering and need some help please.

The current setup:

  • Unraid
  • Docker Compose
  • user/group with ids 99/100 and all folders are tripple checked for rights
  • docker folder for service with all static files
  • appdata folder for service with ssh config folder, sshd_config and ssh_host_keys folder
  • separate folder for repos

The service is up an running but a login with the git user gives me (ssh git@git-server -p 22):

fatal: could not open '/dev/null' for reading and writing: Permission denied
Connection to git-server closed.

In the enhanced logs/debug mode i get:

15/01/2023 21:43:42 Accepted publickey for git from 10.0.1.28 port 55336 ssh2: RSA SHA256:xxxx
15/01/2023 21:43:42 Received disconnect from 10.0.1.28 port 55336:11: disconnected by user
15/01/2023 21:43:42 Disconnected from user git 10.0.1.28 port 55336

I tried going directly into the docker shell and create a repo to clone it but get a similar error with git clone:

git clone ssh://[email protected]:22/xNotes.git
Cloning into 'xNotes'...
fatal: could not open '/dev/null' for reading and writing: Permission denied
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Not sure how to proceed, any logs i can provide i will.

Thank you kindly

@rockstorm101
Copy link
Owner

Hi @xxlbug, thanks for reporting back. I've been able to reproduce this behavior. I suspect I missed the -H option on the script I provided on this answer. (Which again proves that fiddling with system users must be done very carefully) Please change it as follows and let us know if you can now log in and clone repositories.

- adduser -u 405 -G users -h /dev/null -g 'guest' -S guest
+ adduser -u 405 -G users -H -h /dev/null -g 'guest' -S guest

@xxlbug
Copy link
Author

xxlbug commented Jan 19, 2023

Thank you very much, now it works as intended :-)

@xxlbug xxlbug closed this as completed Jan 19, 2023
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