github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

help / setup

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 43
    • 7
  • Source
  • Commits
  • Network (7)
  • Issues (1)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Bash script to help new users set up their git installation — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Updated sed 
retr0h (author)
Tue Nov 24 23:14:13 -0800 2009
commit  1346f7ed55a9e24fc8287c1780b85cb2bccf96aa
tree    4e5b13272483150d31b841d7e3d84a0a124da119
parent  6c9827825f2fb3977ad9edb82a5efc1098864d36
setup /
name age
history
message
file readme.textile Loading commit data...
file setup.sh
file ssh-agent-loader.sh
file wipe.sh
readme.textile

This is a simple bash script to aid users with the git and GitHub setup process. It will do a few things:

  • Set values in your global git config:
    • user.name
    • user.email (used by GitHub to match commits to their author)
    • github.user & github.token (used by third-party apps that interact with GitHub and Gist)
  • Help you create a new ssh key if one is not found
  • Upload your public ssh key to your GitHub account
  • Ensure ssh-agent loads for msysgit users

This script has been tested on OSX Snow Leopard and Msysgit. You must have git installed before you run this script.

Downloading and running the script

$ git clone git://github.com/help/setup.git
$ setup/setup.sh
GitHub username not found, please enter: tekkub
GitHub token not found in global git config
Please enter GitHub password for tekkub (this will not be saved):
Fetching API token
Saving GitHub token to global git config
Enter git committer name (return to use 'tekkub'):
Enter git committer email (return to use 'tekkub@gmail.com'):
No id_rsa key found, generate one? (y/n) y

****************************************************************************
*     GitHub highly recommends you use a strong passphrase on your key     *
* Visit http://help.github.com/working-with-key-passphrases/ for more info *
****************************************************************************

Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/tekkub/.ssh/id_rsa.
Your public key has been saved in /Users/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
67:f1:d6:da:55:22:e0:7f:22:f5:47:f1:16:a6:59:fc tekkub@gmail.com
Upload id_rsa key to your github account? (y/n) y

Msysgit (windows) users will be presented with an extra option, since ssh-agent doesn’t load by default in msysgit:

You appear to be running Msysgit, would you like to use the ssh-agent loader?
This script will load ssh-agent to save your passphrase so that you don't need
to re-enter the passphrase every time you use your ssh key.
For more info visit http://help.github.com/working-with-key-passphrases/

Install script to your .bashrc file? (y/n) y
Script installed, you will need to re-open git bash to load your key.
[Tekkub@KAKU: ~ master]$
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server