summaryrefslogtreecommitdiff
path: root/_posts
diff options
context:
space:
mode:
authortekkub <tekkub@gmail.com>2009-07-27 01:51:05 -0600
committertekkub <tekkub@gmail.com>2009-07-27 01:51:05 -0600
commit6e4eaa1e31846f42fa50cee48b73bf0079e9aba6 (patch)
treef826efbca5942d4cf3e19ee95a936a2948166563 /_posts
parentb5a95e8c10b04c5d2add56c9d9815113149adf3f (diff)
Make pretty console pre blocks
Diffstat (limited to '_posts')
-rw-r--r--_posts/2009-06-14-mac-git-installation.textile2
-rw-r--r--_posts/2009-06-15-mac-key-setup.textile8
-rw-r--r--_posts/2009-06-15-msysgit-key-setup.textile6
-rw-r--r--_posts/2009-06-16-forking.textile10
-rw-r--r--_posts/2009-06-17-troubleshooting-ssh.textile8
-rw-r--r--_posts/2009-06-20-git-email-settings.textile6
-rw-r--r--_posts/2009-06-25-moving-a-repo.textile2
-rw-r--r--_posts/2009-07-04-git-html-help.textile2
8 files changed, 22 insertions, 22 deletions
diff --git a/_posts/2009-06-14-mac-git-installation.textile b/_posts/2009-06-14-mac-git-installation.textile
index 085fbf2..ba47319 100644
--- a/_posts/2009-06-14-mac-git-installation.textile
+++ b/_posts/2009-06-14-mac-git-installation.textile
@@ -17,7 +17,7 @@ h2. MacPorts
# Make sure your ports are up to date.
# Install Git _(You may want to include Subversion support if you want to import SVN repositories)_
-<pre>$ sudo port selfupdate
+<pre class="terminal">$ sudo port selfupdate
MacPorts base version 1.600 installed
Downloaded MacPorts base version 1.600
diff --git a/_posts/2009-06-15-mac-key-setup.textile b/_posts/2009-06-15-mac-key-setup.textile
index ff33404..3f117db 100644
--- a/_posts/2009-06-15-mac-key-setup.textile
+++ b/_posts/2009-06-15-mac-key-setup.textile
@@ -13,7 +13,7 @@ h2. Backup and remove existing keys
Unless this is your first time setting up ssh or git on your computer, you should doublecheck that keys do not already exist. If they do you can either use the existing key(s) or remove them. In either case, you should make a backup of the keys.
-<pre>$ cd ~/.ssh
+<pre class="terminal">$ cd ~/.ssh
$ ls
config id_rsa id_rsa.pub known_hosts
$ cd ..
@@ -29,7 +29,7 @@ p(. _If you have an existing keypair you wish to use, you can skip this step._
Now that we're certain ssh won't use an existing key, it's time to generate a new keypair. Lets make an RSA keypair:
-<pre>$ ssh-keygen -t rsa -c "tekkub@gmail.com"
+<pre class="terminal">$ ssh-keygen -t rsa -c "tekkub@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/tekkub/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
@@ -57,7 +57,7 @@ h2. Adding the key to your GitHub account
Now launch your browser and open the "account page":https://github.com/account. In the "SSH Public Keys" section click "add another public key", then paste your public key into the "key" field. If you leave the title blank the key comment (your email) will be used for the title.
-Make sure you use the public key (@id_rsa.pub@ in our example), and do not add any newlines or whitespace inside the key. To ensure you copy the key correctly, you can copy the key directly into the clipboard from Terminal.app: <pre>$ cat ~/id_rsa.pub | pbcopy</pre>
+Make sure you use the public key (@id_rsa.pub@ in our example), and do not add any newlines or whitespace inside the key. To ensure you copy the key correctly, you can copy the key directly into the clipboard from Terminal.app: <pre class="terminal">$ cat ~/id_rsa.pub | pbcopy</pre>
!/images/add_key.png!
@@ -65,7 +65,7 @@ h2. Testing things out
Testing if our new key works is simple:
-<pre>$ ssh git@github.com
+<pre class="terminal">$ ssh git@github.com
Hi tekkub! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.</pre>
diff --git a/_posts/2009-06-15-msysgit-key-setup.textile b/_posts/2009-06-15-msysgit-key-setup.textile
index 651dd9a..5eef286 100644
--- a/_posts/2009-06-15-msysgit-key-setup.textile
+++ b/_posts/2009-06-15-msysgit-key-setup.textile
@@ -13,7 +13,7 @@ h2. Backup and remove existing keys
Unless this is your first time installing msys on your computer, you should doublecheck that keys do not already exist. If they do you can either use the existing key(s) or remove them. In either case, you should make a backup of the keys.
-<pre>$ cd ~/.ssh
+<pre class="terminal">$ cd ~/.ssh
$ ls
config id_rsa id_rsa.pub known_hosts
$ cd ..
@@ -29,7 +29,7 @@ p(. _If you have an existing keypair you wish to use, you can skip this step._
Now that we're certain ssh won't use an existing key, it's time to generate a new keypair. Lets make an RSA keypair:
-<pre>$ ssh-keygen -t rsa -c "tekkub@gmail.com"
+<pre class="terminal">$ ssh-keygen -t rsa -c "tekkub@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Tekkub/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
@@ -53,7 +53,7 @@ h2. Testing things out
Testing if our new key works is simple:
-<pre>$ ssh git@github.com
+<pre class="terminal">$ ssh git@github.com
Hi tekkub! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.</pre>
diff --git a/_posts/2009-06-16-forking.textile b/_posts/2009-06-16-forking.textile
index b65c4c8..156bda2 100644
--- a/_posts/2009-06-16-forking.textile
+++ b/_posts/2009-06-16-forking.textile
@@ -15,10 +15,10 @@ h2. Setting up
Naturally, the first thing you must do is create your fork. To do this, you simply click the !http://github.com/images/modules/repos/fork_button.png! button on the project's page. When the fork has completed, you will be presented with your new repo information.
Now you need to clone the fork. Make sure you use the "Your Clone URL" and *not* the "Public Clone URL"
-<pre>$ git clone git@github.com:billyanyteen/github-services.git</pre>
+<pre class="terminal">$ git clone git@github.com:billyanyteen/github-services.git</pre>
Once the clone is complete your repo will have a remote named "origin" that points to your fork on github. Don't let the name confuse you, this *does not* point to the original repo you forked from. To help you keep track of that repo we will add another remote named "upstream"
-<pre>$ cd github-services
+<pre class="terminal">$ cd github-services
$ git remote add upstream git://github.com/pjhyett/github-services.git
$ git fetch upstream</pre>
@@ -27,7 +27,7 @@ Note that we used the public clone URL for upstream, so we can't push changes di
h2. Pushing your changes
Now that we've got our fork, we need to make a few changes and commit them locally. Once you've done this, it's time to push your updated branch.
-<pre>$ git push origin master</pre>
+<pre class="terminal">$ git push origin master</pre>
After you've pushed your commit(s) you need to inform the project owner of the changes so they can pull them into their repo. From your project's page, click the !http://github.com/images/modules/repos/pull_request_button.png! button. Fill in a note and pick who to send the request to. In large projects it is important that you *do not* send the request to every person who's touched the project. Make sure you're only sending to the people who care, the user(s) that manage the core project repo.
@@ -36,10 +36,10 @@ _Note that some projects do not accept pull requests. Make sure you submit your
h2. Pulling in upstream changes
Some time has passed, the upstream repo has changed and you want to update your fork before you submit a new patch. There are two ways to do this:
-<pre>$ git fetch upstream master
+<pre class="terminal">$ git fetch upstream master
$ git merge upstream/master</pre>
-<pre>$ git pull upstream master</pre>
+<pre class="terminal">$ git pull upstream master</pre>
@git pull@ is a more direct way, but the merge it performs can be confusing if the user doesn't expect it and a merge conflict results. @git fetch@ will also grab all branches, where @git pull@ will only grab the one specified.
diff --git a/_posts/2009-06-17-troubleshooting-ssh.textile b/_posts/2009-06-17-troubleshooting-ssh.textile
index a537568..219cd68 100644
--- a/_posts/2009-06-17-troubleshooting-ssh.textile
+++ b/_posts/2009-06-17-troubleshooting-ssh.textile
@@ -7,7 +7,7 @@ categories: setup
---
The first step to testing your connection is to run <code>ssh git@github.com</code>. If your key works, you should get a success message:
-<pre>$ ssh git@github.com
+<pre class="terminal">$ ssh git@github.com
Hi username! You've successfully authenticated, but GitHub does not provide shell access.</pre>
If this step fails, try running <code>ssh -v git@github.com</code>. This will print out debug info on what ssh is trying to do. In this output you should check that ssh is connecting to the correct server, on the correct port (22). Many firewalls and proxies will block this connection. Also ensure that ssh is reading the correct key files, these are at ~/.ssh/id_rsa, id_dsa and identity by default. If your key is not at this location, you should move it or create an override (see the "SSH config" section below).
@@ -42,7 +42,7 @@ Create or open the file at <code>~/.ssh/config</code> Add the following lines:
You may also need to update the permissions on your .ssh folder and its contents. The SSH application will ignore secret files that are too permissive.
-<pre>$ chmod 700 ~/.ssh
+<pre class="terminal">$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/*</pre>
h2. No supported authentication methods available
@@ -53,11 +53,11 @@ See "this post":http://groups.google.com/group/github/browse_thread/thread/21fd0
Especially with cygwin-git+pageant+putty/plink, you might want to set GIT_SSH to your plink.exe location -- unless that doesn't work for you. In certain circumstances (perhaps after a service pack installation), you will find git network operations failing with
this is because plink.exe running from your (cygwin-provided) git command "*can't talk with pageant to get its keys*":http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/cygwin-clobbers-pageant.html . A solution is to set up a script that has:
-<pre>/cygdrive/c/ntnot/plink.exe -i "c:\users\you\.ssh\key-file-for-github.ppk" $1 $2</pre>
+<pre class="terminal">/cygdrive/c/ntnot/plink.exe -i "c:\users\you\.ssh\key-file-for-github.ppk" $1 $2</pre>
and set GIT_SSH to point to this:
-<pre>declare -x GIT_SSH="c:\path\to\script"</pre>
+<pre class="terminal">declare -x GIT_SSH="c:\path\to\script"</pre>
This explicitly provides the key for plink to use, rather than have it talk with pageant.
diff --git a/_posts/2009-06-20-git-email-settings.textile b/_posts/2009-06-20-git-email-settings.textile
index 4a1d08d..c057413 100644
--- a/_posts/2009-06-20-git-email-settings.textile
+++ b/_posts/2009-06-20-git-email-settings.textile
@@ -12,7 +12,7 @@ Git needs to know your username and email address to properly credit your commit
p(. _The "email" setting does not have to be a valid email address, it only need match the "user@server" naming scheme._
-<pre>$ git config --global user.name "Tekkub"
+<pre class="terminal">$ git config --global user.name "Tekkub"
$ git config --global user.email "tekkub@gmail.com"</pre>
h2. Overriding settings for individual repos
@@ -21,7 +21,7 @@ If you do not want commits to be "blamed" on your global email setting, you can
p(. _This change will only affect future commits. Existing commits will retain the info they were committed with._
-<pre>$ cd my_other_repo
+<pre class="terminal">$ cd my_other_repo
$ git config user.name "Not Tekkub"
$ git config user.email "not@tekkub.net"</pre>
@@ -29,7 +29,7 @@ h2. GitHub token config
Some tools connect to GitHub without SSH, for these tools you need to set your "local GitHub config":http://github.com/blog/180-local-github-config. You can find your token at the top of the "account page":https://github.com/account
-<pre>$ git config --global github.user tekkub
+<pre class="terminal">$ git config --global github.user tekkub
$ git config --global github.token 0123456789abcdef0123456789abcdef</pre>
If you change your GitHub password a new token will be created, therefore you'll need to change this setting. \ No newline at end of file
diff --git a/_posts/2009-06-25-moving-a-repo.textile b/_posts/2009-06-25-moving-a-repo.textile
index d817cea..461ebcf 100644
--- a/_posts/2009-06-25-moving-a-repo.textile
+++ b/_posts/2009-06-25-moving-a-repo.textile
@@ -16,7 +16,7 @@ p(. _If you forked this step is not necessary, but you may still do it for good
To create a complete mirror that includes all branches and tags, you need to do a bare-clone followed by a mirror-push:
-<pre>git clone --bare git@github.com:myaccount/my-old-repo.git
+<pre class="terminal">git clone --bare git@github.com:myaccount/my-old-repo.git
cd my-old-repo
git push --mirror git@github.com:mycompany/our-new-repo.git
cd ..
diff --git a/_posts/2009-07-04-git-html-help.textile b/_posts/2009-07-04-git-html-help.textile
index 1d171f3..692d5a3 100644
--- a/_posts/2009-07-04-git-html-help.textile
+++ b/_posts/2009-07-04-git-html-help.textile
@@ -12,7 +12,7 @@ h2. OSX
The following commands were run on an installation of the "git-osx-installer":http://code.google.com/p/git-osx-installer/. Your documentation path may be different, pay attention to the output of @git help --web commit@ for where your git is set to look for the HTML files.
-<pre>$ git help --web commit
+<pre class="terminal">$ git help --web commit
fatal: '/usr/local/git/share/doc/git-doc': not a documentation directory.
$ git clone git://git.kernel.org/pub/scm/git/git.git