markdown [为github创建私人访问令牌] #github

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown [为github创建私人访问令牌] #github相关的知识,希望对你有一定的参考价值。

# Generating Access Token

As of [2013-05-16](https://github.blog/2013-05-16-personal-api-tokens/), you can generate API Access Tokens via the Web UI or via the GitHub API.
**All other authorization methods is deprecated.**

## Web
* Account Settings -> [Personal access tokens](https://github.com/settings/tokens)
* "Generate new token" under "Personal access tokens"
* For "Token description" you should give it a meaningful name, Example: sublime gist
* Under "Select scopes" you can just select gist

Paste the token in the settings section under the token option.

## API

Here's a command you can run from your terminal to generate a token via curl:

    curl -i -u USERNAME https://api.github.com/authorizations --data '{"scopes":["gist"],"note":"SublimeText 2/3 Gist plugin"}'

Where `USERNAME` is your Github username. Save the token generated and paste it in the settings section under the token option.

If OTP is enabled on your account, this will return 401 error code, use:

    curl -i -u USERNAME -H "X-GitHub-OTP: OTPCODE" https://api.github.com/authorizations --data '{"scopes":["gist"],"note":"SublimeText 2/3 Gist plugin"}'
    
Where `OTPCODE` is the code your authenticator app shows you.

摘取至:
https://github.com/condemil/Gist/blob/master/README.md

以上是关于markdown [为github创建私人访问令牌] #github的主要内容,如果未能解决你的问题,请参考以下文章

markdown 从私有GitHub仓库下载单个文件。您需要一个访问令牌,如本GitHub帮助文章中所述:https://help.github

github设置仓库可见性 私人仓库设置他人协作/可见

Laravel 通过 Passport 实现 API 请求认证:沙箱测试篇(私人访问令牌)

从令牌创建 Django 会话

公开使用 GitHub 访问令牌

❤️ Typora + PicGo + Gitee/GitHub ❤️ 免费搭建个人图床