christianmlong + git + config   6

github deploy keys: how Do I authorize more than one repository for a single machine - Stack Overflow
The simplest solution I found was outlined here.

1) Enter this command(You'll do this for however many keys you need):

ssh-keygen -t rsa -C "your_email@example.com"

2) When prompted with the the statement below type in a unique name(i.e.,foo1_rsa).The file will be created in your current directory and you may need to move it to .ssh if you want to be tidy:

Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]

3) Update your SSH config file:

vi ~/.ssh/config

Which may be empty:

Host cheech github.com
Hostname github.com
IdentityFile ~/.ssh/foo1_rsa

Host chong github.com
Hostname github.com
IdentityFile ~/.ssh/foo2_rsa
ssh  git  deploy  key  multiple  config 
october 2015 by christianmlong
Using Multiple Github Deploy Keys for a Single User on a Single Linux Server | Snipe.Net
Fortunately, the workaround here is very simple, using named SSH keys and an SSH config file.
ssh  git  deploy  key  multiple  config 
october 2015 by christianmlong
In what cases could `git pull` be harmful? - Stack Overflow
However, with all versions of Git, I recommend configuring a git up alias like this:

git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'

and using git up instead of git pull. I prefer this alias over git pull --ff-only because:

it works with all (non-ancient) versions of Git,
it fetches all upstream branches (not just the branch you're currently working on), and
it cleans out old origin/* branches that no longer exist upstream.
git  pull  up  alias  config  ff-only  merge 
july 2015 by christianmlong
git - Can I specify multiple users for myself in .gitconfig? - Stack Overflow
You can configure an individual repo to use a specific user / email address.

git config user.name "Your Name Here"
git config user.email your@email.com

where as the default user / email is configured in your ~/.gitconfig

git config --global user.name "Your Name Here"
git config --global user.email your@email.com
git  config  multiple  emails 
july 2015 by christianmlong

Copy this bookmark:



description:


tags: