diff options
| author | Steve Lee <me@xiangyangli.com> | 2016-10-12 00:47:16 +0800 |
|---|---|---|
| committer | Steve Lee <me@xiangyangli.com> | 2016-10-12 00:47:16 +0800 |
| commit | 3247365f03b803733033c0632a625d25fd307b59 (patch) | |
| tree | be8909a83da273474006ee664b1c5ecf4dffa1b2 | |
| parent | e8a76cfac23e02dc8cc647280aee1ba92faa72d7 (diff) | |
| download | Personal-3247365f03b803733033c0632a625d25fd307b59.tar.xz Personal-3247365f03b803733033c0632a625d25fd307b59.zip | |
add a draft
| -rw-r--r-- | draft/multiple_ssh_key_setting.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/draft/multiple_ssh_key_setting.md b/draft/multiple_ssh_key_setting.md new file mode 100644 index 0000000..07772dc --- /dev/null +++ b/draft/multiple_ssh_key_setting.md @@ -0,0 +1,24 @@ +~/.ssh/config alias +gitDir/.git/config + +change + +# ~/.ssh/config +Host work + HostName bitbucket.org + IdentityFile ~/.ssh/work + +Host personal + HostName bitbucket.org + IdentityFile ~/.ssh/personal +And then in my project's local git config, I changed the host part of the remote URL to the appropriate host. For example, in the following file: + +# ~/repos/myworkproject/.git/config +# or you can access this file by going into the repo and running `git config -e` +...snip... +[remote "origin"] + fetch = ... + url = git@bitbucket.org:mybitbucketusername/myworkproject.git +Change the url line to: + +url = git@work:mybitbucketusername/myworkproject.git |
