Setting Up Users, Permissions and Groups for SSH Access to a Shared Git Repository  
  
    If you are having permission problems using git, such as 
error: insufficient permission for adding an object to repository database ./objects
There are a couple thing you can do to remedy the situation, before moving to a full on git server like gitosis....  
  
    
      Written by Sean Behan on 06/17/2012
    
  
 
  
    Adding Public/Private Key Pairs on Mac OS X and Ubuntu for Passwordless Remote SSH Sessions  
  
    On your local machine cd into the .ssh directory in your home "~/" directory. If it doesn't exist you can create it with "mkdir ~/.ssh". Next generate your public/private keys and copy the public key to the remote server.
    cd ~/.ssh
    ssh-keygen ...  
  
    
      Written by Sean Behan on 06/17/2012
    
  
 
  
    Non Standard Port Number with SSH and Git  
  
    Here is an example using the port 4567 to connect with over ssh and git
ssh remote add origin ssh://sean@seanbehan.com:4567/path/to/git
git push origin master
  
  
    
      Written by Sean Behan on 06/17/2012
    
  
 
  
    Change default ssh port number on Ubuntu  
  
    Login as the root user or as a user that can execute sudo commands.
#open this file for editing...
vim /etc/ssh/sshd_config
Find the line that reads
Port 22
Change this to an different and an available port number...
Port 8000
Next reload ssh
/etc/...  
  
    
      Written by Sean Behan on 06/17/2012