summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortekkub <tekkub@gmail.com>2010-01-19 16:26:37 -0700
committertekkub <tekkub@gmail.com>2010-01-19 16:26:44 -0700
commite7b559b62d7fde31ad59c55f537ae29f56afc19f (patch)
tree4c6dd1e42fcff7004631504f97a4d62cee755b4b
parent43493783bf20a9895c02a276c5244fdb5ca4c405 (diff)
Adding in some more guides
-rw-r--r--_posts/2010-01-19-managing-clients.markdown34
-rw-r--r--_posts/2010-01-19-multiple-keys.markdown37
-rw-r--r--_posts/2010-01-19-textmate.markdown10
3 files changed, 81 insertions, 0 deletions
diff --git a/_posts/2010-01-19-managing-clients.markdown b/_posts/2010-01-19-managing-clients.markdown
new file mode 100644
index 0000000..ea29349
--- /dev/null
+++ b/_posts/2010-01-19-managing-clients.markdown
@@ -0,0 +1,34 @@
+---
+layout: default
+title: Managing multiple clients
+description: How to manage multiple clients and their repositories
+categories: collaborating setup
+main_category: setup
+---
+
+Are you a freelance developer working on multiple projects for multiple clients, and want to manage them here on GitHub? Never fear, this guide will detail the most common solutions to this problem
+
+One account, multiple collaborators
+===================================
+
+This design lets you retain control over the repos, but still gives your clients access to them.
+
+This is the simplest (and cheapest) approach. Simply create one account with a plan that provides enough private repos to cover all your projects. If your client needs access to the source code, have them create a free account. You can then add their free account as a collaborator on the projects you wish for them to have access to.
+
+If you wish, you can even bill your clients for the cost of your account, and maintaining their repos on it!
+
+Multiple accounts, one collaborator
+===================================
+
+This design gives the control over the repos (and the bill) to your client, but still allows you to push into all your clients' repos from a single account.
+
+With this design, have your clients each open their own paid account and create empty repos for each project. Add your account to the repos as a collaborator. You can now push to their repos as if they were your own!
+
+Multiple accounts, no collaborators
+===================================
+
+__This is by far the most complicated setup, and should be avoided if at all possible.__
+
+If, for whatever reason, you *must* push to each client's repos using _their_ account, this is the setup you will have to use.
+
+First, generate a second keypair to use for your second account. To create this key follow [this guide](/key-setup-redirect), but specify a path for the key. If you do not specify a path you may overwrite your existing key. For example, you could use `~/.ssh/id_rsa_client`. Once the key has been created, add the new public key to the client's account on GitHub. To configure your local settings, see [this guide](/multiple-keys).
diff --git a/_posts/2010-01-19-multiple-keys.markdown b/_posts/2010-01-19-multiple-keys.markdown
new file mode 100644
index 0000000..52c5c6e
--- /dev/null
+++ b/_posts/2010-01-19-multiple-keys.markdown
@@ -0,0 +1,37 @@
+---
+layout: default
+title: Multiple SSH keys
+description: How to push using different SSH keys on the same computer
+categories: other
+---
+
+This guide assumes you have already created two keypairs and attached them to different GitHub user accounts. For this example we will be using `~/.ssh/id_rsa` attached to the user `joe` and `~/.ssh/id_rsa_client` attached to the user `client`.
+
+Adding your keys to SSH
+=======================
+
+The first keypair, `~/.ssh/id_rsa`, uses a default name, so we don't need to do anything special to make SSH use this pair. The second pair, however, is not a default name. Therefore, we need to tell ssh about it so that it can use it:
+
+<pre class="terminal">ssh-add ~/.ssh/id_rsa_client</pre>
+
+If the keypair has a passphrase on it (it should!), `ssh-add` will ask you to enter the passphrase. After you have done this, the key will be available from ssh-agent so you won't have to re-enter the passphrase every time you use it.
+
+Configuring SSH
+===============
+
+Once SSH has access to both keys, you need to tell it which key to use for which server. In most cases you can assume that SSH will fall back to `~/.ssh/id_rsa` by default, but we're going to force it anyway. To begin, open `~/.ssh/config` in your favorite editor.
+
+<script src="http://gist.github.com/281414.js?file=config"></script>
+
+In short what this does is tells SSH to use the client key when connecting to the server github-client, which is really github.com.
+
+Using the second key
+====================
+
+From here on, everything is the same as everyday use except for one component, the domain name. When working on a repo owned by the primary account, we would use a command like:
+
+<pre class="terminal">git clone git@github.com:joe/my_repo.git</pre>
+
+When we want to use the second account's key, however, we need to change the domain name. Doing so will use the settings in `~/.ssh/config` to override the defaults.
+
+<pre class="terminal">git clone git@github-client:client/his_repo.git</pre>
diff --git a/_posts/2010-01-19-textmate.markdown b/_posts/2010-01-19-textmate.markdown
new file mode 100644
index 0000000..ae9de76
--- /dev/null
+++ b/_posts/2010-01-19-textmate.markdown
@@ -0,0 +1,10 @@
+---
+layout: default
+title: Textmate
+description: How to use Textmate as your git editor
+categories: mac
+---
+
+Using Textmate as your git editor is fairly simple, you just need to to make sure Textmate informs git when the document is closed. You can do this by using `mate -w`:
+
+<pre class="terminal">git config --global core.editor "mate -w"</pre>