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."
- Recomendamos que você revise regularmente as integrações autorizadas. Remova todos os aplicativos e tokens que não tenham sido usados por um tempo. Para obter mais informações, consulte "Revisar integrações autorizadas".
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
Se você tem um token, é possível inseri-lo em vez de sua senha ao realizar operações Git em HTTPS.
Por exemplo, você digitaria o seguinte na linha de comando:
$ 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.