github/developer.github.com — pull request #346 by izuzak (2013-11-01 15:25:33+00:00)
Title: Templetize cURL examples that use usernames and tokens for authentication

As mentioned in https://github.com/github/developer.github.com/pull/330, the curl examples in the [Authentication docs](http://developer.github.com/v3/auth/) might be misleading for some users.

For example, users shouldn't try to authenticate as mojombo because it will fail, and some users might think that the way to fix this is to modify the URL somehow (e.g. replace `user` with their username):

```bash
$ curl -u mojombo https://api.github.com/user
```

Instead, I'd like to suggest a templetized approach to the curl command, like so:

```bash
$ curl -u https://api.github.com/user
```

Using `:username` as the format for templetizing might be confusing when not used in the URL. The second curl example in this page demonstrates this problem. So, this could be confusing:

```bash
$ curl -u :token:x-oauth-basic https://api.github.com/user
```

but this probably won't be:

```bash
$ curl -u :x-oauth-basic https://api.github.com/user
```

cc @gjtorikian @jasonrudolph