2

I would like to share some of my work with my colleagues. The whole company uses flavors of Debian Linux and is connected in a LAN network. I don't want to bug the administrator with access to the servers and would just like to leave my PC on, and provide read access to anyone interested.

But I can't figure out how to do it. We use ssh for authentication and gitolite for authorization.

What was tried:

$ sudo adduser guest
$ su guest
$ cd ~
$ git clone somerepo
$ ls -l somerepo
drwxr-xr-x 4 guest guest 4096 Mar 22 14:11 somerepo

On a different machine:

$ git clone [email protected]:somerepo
[email protected]'s password
4
  • so what's the problem with this setup? Commented Mar 22, 2016 at 12:42
  • Yes, please edit and explain what actually happened. Does this work? If not, how did it fail?
    – terdon
    Commented Mar 22, 2016 at 13:04
  • The problem is that it is asking for a password! When you are cloning someone's repo from GitHub, for example, you don't need to provide any passwords.
    – Vorac
    Commented Mar 22, 2016 at 13:32
  • @Vorac that depends on how the repo has been set up. Please edit your question and explain that the problem is the password.
    – terdon
    Commented Mar 22, 2016 at 13:54

1 Answer 1

1

The password is probably for ssh, not git. You probably need to set an empty password for guest via

sudo passwd -d guest

I would however rather recommend to keep a password that you give to everyone allowed, and encourage them to setup a private / public key for ssh if they want to login without providing a password. This way, you have no open login for everyone (even undesired) on your host. To do so, every one else should use ssh-keygen to generate their key if they don't have one, and then

ssh-copy-id guest@yourhost

to install their public key on yourhost and login without a password. This will add their public key to the file /home/guest/.ssh/authorized_keys on yourhost

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .