The Wayback Machine - https://web.archive.org/web/20220110223237/https://docs.github.com/ja/github/extending-github/git-automation-with-oauth-tokens

Git automation with OAuth tokens

You can use OAuth tokens to interact with GitHub via automated scripts.

Step 1: Get an OAuth token

Create a personal access token on your application settings page. For more information, see "Creating a personal access token."

Tips:

  • You must verify your email address before you can create a personal access token. For more information, see "Verifying your email address."
  • 認可されたインテグレーションを定期的にレビューすることをおすすめします。 しばらくの間使われていないアプリケーションやトークンは削除してください。 詳しい情報については「認可されたインテグレーションのレビュー」を参照してください。

As a security precaution, GitHub automatically removes personal access tokens that haven't been used in a year. To provide additional security, we highly recommend adding an expiration to your personal access tokens.

Step 2: Clone a repository

トークンを入手したなら、HTTPS経由でGitの操作をする際にパスワードの代わりにそのトークンを入力できます。

たとえば、コマンドラインでは以下のように入力できます。

$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token

To avoid these prompts, you can use Git password caching. For information, see "Caching your GitHub credentials in Git."

Warning: Tokens have read/write access and should be treated like passwords. If you enter your token into the clone URL when cloning or adding a remote, Git writes it to your .git/config file in plain text, which is a security risk.

Further reading

これらのドキュメントを素晴らしいものにするのを手伝ってください!

GitHubのすべてのドキュメントはオープンソースです。間違っていたり、はっきりしないところがありましたか?Pull Requestをお送りください。

コントリビューションを行う

OR, コントリビューションの方法を学んでください。

問題がまだ解決していませんか?