File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -30,22 +30,23 @@ To use Basic Authentication with the GitHub API, simply send the username and
3030password associated with the account.
3131
3232For example, if you're accessing the API via [ cURL] [ curl ] , the following command
33- would authenticate with ` mojombo ` as the username. (cURL will prompt you to
34- enter the password.)
33+ would authenticate you if you replace ` < username> ` with your GitHub username.
34+ (cURL will prompt you to enter the password.)
3535
3636<pre class =' terminal ' >
37- curl -u mojombo https://api.github.com/user
37+ curl -u < username > https://api.github.com/user
3838</pre >
3939
4040### Via OAuth Tokens
4141
4242Alternatively, you can authenticate using [ personal access
4343tokens] [ personal-access-tokens ] or OAuth tokens. To do so, provide the token as
44- the username and provide a blank password or a password of ` x-oauth-basic ` . For
45- example:
44+ the username and provide a blank password or a password of ` x-oauth-basic ` . If
45+ you're accessing the API via cURL, replace ` <token> ` with your OAuth token in
46+ the following command:
4647
4748<pre class =' terminal ' >
48- curl -u 3816d821c80a6847ca84550052c1ff6246e8169b :x-oauth-basic https://api.github.com/user
49+ curl -u < token > :x-oauth-basic https://api.github.com/user
4950</pre >
5051
5152This approach is useful if your tools only support Basic Authentication but you
You can’t perform that action at this time.
0 commit comments