Skip to content

Instantly share code, notes, and snippets.

@webdevwilson
Created February 4, 2012 18:59
Show Gist options
  • Save webdevwilson/1739489 to your computer and use it in GitHub Desktop.
Save webdevwilson/1739489 to your computer and use it in GitHub Desktop.
Host git over SSL
# on your server (via ssh)
mkdir ~/git/yourprojectname.git
cd ~/git/yourprojectname.git
git --bare init
# in your project directory (on your local machine):
# setup your user info
git config --global user.name "Firstname Lastname"
git config --global user.email "[email protected]"
# initialize the workspace
git init
git add .
git commit -m "initial commit"
git remote add origin ssh://[email protected]/~/git/yourprojectname.git
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment