ALLEYCAT Mac OS
Requirements: I have a need to share a git repository on a publicly facing server with our development team who are geographically disparate. The team should not have full root SSH access to the server, and the repository should be private (not publicly accessible).
We would like to use SSH keys for authentication so that the developer does not have to type in their password each time they issue a git command that interacts with the server.
The latest versions of Adobe Reader do not support viewing PDF files within Firefox on Mac OS and if you are using a modern (Intel. Mac OS has such good HiDPI support compared to Windows (and especially Linux). Alleycat on Mar 18, 2017. What really needs to happen is a big name company with.
These instructions assume Ubuntu Linux 10.04 and Mac OS X client. The instructions are pretty identical if your local workstation is some flavour of Linux. If you want instructions on how to generate a SSH key on Windows, follow these instructions from github.com, which are listed at the bottom of this post.
Begin on the server in question that we’ll call repository.yourtestserver.com:
#create a group for a repository
create group in webmin (gittestuser)
#create a user for the repository and add it to the group.
#Make sure and create a home directory for that user.
create user in webmin (gittestuser)
#give the group rights to the repository – in our example: gittest
Alley Cat Costume
then issue these commands
On Mac OS X client
#generate your local SSH Public key
# stores it in /.ssh/
#copy the public key to the .ssh/authorized_keys file for the gittestuser user using
#handy utility called ssh-copy-id
NOTE: You will need to download a copy of the ssh-copy-id script which is not part of Mac OS X for some reason.
#install and set permissions for ssh-copy-id on your local Mac OS X machine
#once you’ve downloaded the ssh-copy-id script, you want to use it to copy your rsa id to the ~/.ssh/authorized_keys file on the server using the following command.
#SSH into the server with root and verify that the authorized_keys file has been updated
#test ssh access using the gittestuser account and that it is using the SSH key, not requiring a password
#Once, normal SSH access is enabled change the shell for gittestuser to /usr/lib/git-core/git-shell
#so that the only type of access the user has to the server is git.
#First, find out where the git-shell is located:
#edit passwd file for gittestuser (make sure you are logged in as root if not, use sudo)
#change gittestuser shell from /bin/sh to /usr/lib/git-core/git-shell the following line should look like:
I’ve also found that you can change the shell to /usr/lib/git-core/git-shell by editing the user through the webmin interface, which is obviously alot easier.
#Now you can try accessing the server with the shell changed and you should be disconnected.
#The following lines are what you should see when trying to connect via regular shell.
fatal: What do you think I am? A shell?
Connection to repository.gittestserver.com closed.
The reason that you change the shell, is so that your developers can only issue git type commands on the server through SSH access, they don’t get any real SSH access to the server.
#now try to clone the repository from the local Mac OS X machine.
Instructions for Windows that may be helpful to you:
For Windows, the best way to do generate an SSH key is to install Win/msysgit, the instructions for Win/msysgit can be found at github.com
The instructions for generating the key are very similar to Linux, but can be found here.
Requirements: I have a need to share a git repository on a publicly facing server with our development team who are geographically disparate. The team should not have full root SSH access to the server, and the repository should be private (not publicly accessible).
We would like to use SSH keys for authentication so that the developer does not have to type in their password each time they issue a git command that interacts with the server.
These instructions assume Ubuntu Linux 10.04 and Mac OS X client. The instructions are pretty identical if your local workstation is some flavour of Linux. If you want instructions on how to generate a SSH key on Windows, follow these instructions from github.com, which are listed at the bottom of this post.
Begin on the server in question that we’ll call repository.yourtestserver.com:
#create a group for a repository
create group in webmin (gittestuser)
#create a user for the repository and add it to the group.
#Make sure and create a home directory for that user.
create user in webmin (gittestuser)
#give the group rights to the repository – in our example: gittest
then issue these commands
On Mac OS X client
#generate your local SSH Public key
# stores it in /.ssh/
#copy the public key to the .ssh/authorized_keys file for the gittestuser user using
#handy utility called ssh-copy-id
NOTE: You will need to download a copy of the ssh-copy-id script which is not part of Mac OS X for some reason.
#install and set permissions for ssh-copy-id on your local Mac OS X machine
Alley Cat Mac Os Catalina
#once you’ve downloaded the ssh-copy-id script, you want to use it to copy your rsa id to the ~/.ssh/authorized_keys file on the server using the following command.
#SSH into the server with root and verify that the authorized_keys file has been updated
#test ssh access using the gittestuser account and that it is using the SSH key, not requiring a password
#Once, normal SSH access is enabled change the shell for gittestuser to /usr/lib/git-core/git-shell
#so that the only type of access the user has to the server is git.
#First, find out where the git-shell is located:
#edit passwd file for gittestuser (make sure you are logged in as root if not, use sudo)
Alley Cat Mac Os Update
#change gittestuser shell from /bin/sh to /usr/lib/git-core/git-shell the following line should look like:
I’ve also found that you can change the shell to /usr/lib/git-core/git-shell by editing the user through the webmin interface, which is obviously alot easier.
#Now you can try accessing the server with the shell changed and you should be disconnected.
#The following lines are what you should see when trying to connect via regular shell.
fatal: What do you think I am? A shell?
Connection to repository.gittestserver.com closed.
The reason that you change the shell, is so that your developers can only issue git type commands on the server through SSH access, they don’t get any real SSH access to the server.
#now try to clone the repository from the local Mac OS X machine.
Instructions for Windows that may be helpful to you:
For Windows, the best way to do generate an SSH key is to install Win/msysgit, the instructions for Win/msysgit can be found at github.com
The instructions for generating the key are very similar to Linux, but can be found here.