Marc
Marc

Reputation: 171

Add users to gitosis (configuration/spaces in username)

I'am trying to authorize some windows users on my gitosis-repositorys. The users have "spaces" within their usernames.

The files are added to the gitosis keydir directory and pushed to origin, the new users are added as members in gitosis.conf.

The problem is: If the windows user trys to clone something git asks for a password for gitosis@host.

The question now is: How do I configure a usernames with spaces correctly and why is git asking for a password?

Edit:

  1. I've checked the authorized_keys file - the new public keys are not included. Could that be the reason?
  2. GIT outputs the following warning if I push the changes to the gitosis-admin repo: WARNING:gitosis.ssh:Unsafe SSH username in keyfile: 'User name with [email protected]

How should I deal with that?

Upvotes: 0

Views: 1152

Answers (1)

Joachim
Joachim

Reputation: 31

If git asks for a password, then the git+gitosis setup is not correct.

To get rid of the spaces in usernames, replace them with e.g. underscores. The username simply does not matter, its the SSH key that counts.

Example:

ssh-key filename: "keydir/[email protected]"

contains: "ssh-rsa <...SSH-Key...> [email protected]"

Use "[email protected]" in your gitosis.conf.

The gitosis warning messages comes from /usr/share/pyshared/gitosis/ssh.py (your path may be different). At the top of the file is a regexp. that checks the filename.

And finally, here is a HOWTO to setup git on Windows: Github, Windows and TortoiseGit

Upvotes: 2

Related Questions