GithubHelp home page GithubHelp logo

setup's Introduction

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 '[email protected]'):
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 [email protected]
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]$

setup's People

Contributors

tekkub avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.