Skip to content

Instantly share code, notes, and snippets.

@ryukinix
Created August 1, 2015 04:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryukinix/74325864399231fc4aba to your computer and use it in GitHub Desktop.
Save ryukinix/74325864399231fc4aba to your computer and use it in GitHub Desktop.
A template for fast configuration of git on your Environment Linux
#!/bin/bash
#
# Created by Manoel Vilela
#
ssh_setup() {
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
ssh -T git@github.com
}
# ==* Some local configuration for git *==
git config --global user.name "Your Name"
git config --global user.email "your_email@mail.com"
git config --global push.default simple # keep this
# ==* SSH configuration *==
# SSH cache credentials until one month valid
git config --global credential.helper 'cache --timeout=2628000'
# You must have the id_rsa to exec the part of this code
# A tutorial usefull to generate is here:
# > > >https://help.github.com/articles/generating-ssh-keys/
# ssh_setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment