Skip to content

Commit 744e784

Browse files
committed
Added github generate access token instructions
1 parent 317e2b6 commit 744e784

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

LANGS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
11
* [🇺🇸 English](en/)
2+
* [🇧🇬 Български (beta)](bg/)
3+
* [🇨🇿 Čeština (beta)](cs/)
4+
* [🇩🇪 Deutsch](de/)
5+
* [🇬🇷 Ελληνικά (beta)](el/)
6+
* [🇪🇸 Español (beta)](es/)
7+
* [🇮🇷 فارسی (beta)](fa/)
8+
* [🇫🇷 Français (beta)](fr/)
9+
* [🇭🇺 Magyar (beta)](hu/)
10+
* [🇦🇲 հայերեն (beta)](hy/)
11+
* [🇮🇹 Italiano (beta)](it/)
12+
* [🇯🇵 日本語](ja/)
13+
* [🇰🇵/🇰🇷 한국어 (beta)](ko/)
14+
* [🇵🇱 Polski](pl/)
15+
* [🇧🇷 Português-brasileiro](pt/)
16+
* [🇷🇺 Русский (beta)](ru/)
17+
* [🇸🇰 Slovenčina (beta)](sk/)
18+
* [🇹🇷 Türkçe (beta)](tr/)
19+
* [🇺🇦 Українська](uk/)
20+
* [🇨🇳 简体中文](zh/)

en/deploy/README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,42 @@ To https://github.com/ola/my-first-blog.git
151151
Branch main set up to track remote branch main from origin.
152152
```
153153

154-
> **Note** You might encounter the following error when trying to push to GitHub:
154+
**Note** You will likely encounter the following error when trying to push to GitHub:
155155
```
156156
remote: Support for password authentication was removed on August 13, 2021.
157157
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
158158
fatal: Authentication failed for 'https://github.com/<your-github-username>/my-first-blog.git/'
159159
```
160-
In this case, follow the instructions from GitHub to [create a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic). The token should have the 'repo' scope. Copy the value of the token, then try the git push command again. When you are prompted to enter your username and password, enter the access token instead of your password.
160+
In this case, follow the instructions from GitHub to [create a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic). The token should have the 'repo' scope. Copy the value of the token, then try the git push command again. When you are prompted to enter your username and password, enter the access token instead of your password:
161+
162+
1. Go to profile settings or go here: https://github.com/settings/profile
163+
2. Scroll down and click "Developer settings" on left-hand menu or go here: https://github.com/settings/apps
164+
3. On left-hand menu, press "Personal access tokens" to expand the dropdown menu. Click "Tokens (classic)"
165+
4. In the top-right, click "Generate new token", and then click "Generate new token (classic)". You will need to authenticate your account at this point.
166+
5. Fill in the form:
167+
- Note: Django girls blog
168+
- Expiration: No expiration (or if you want more security, choose 90 days)
169+
- Select scopes: Check every box
170+
6. Press "Generate token"
171+
7. Copy the token generated (it's the text string that likely starts with `ghp...`) and store this token somewhere secure as once you close this page, you will lose access to viewing this token and will need to generate a new one if you lose it. For example, you could store it in a password manager or even in a note on your computer.
172+
8. Run the command in the terminal again:
173+
{% filename %}command-line{% endfilename %}
174+
```
175+
$ git push -u origin HEAD
176+
```
177+
9. When the terminal asks for `username`, enter in your github username. Press enter.
178+
10. Next, it will ask for `password`. Do not use your github password as this method of authenticating ("logging in") is deprecated. Copy the token you just generated (either from github or wherever you carefully stored this token) and carefully paste it into the terminal. Note that as you paste or even type into the terminal for the password, nothing will appear (you can't see what you typed) for security reasons (it's designed like this on purpose). Press enter.
179+
11. If that worked, you will see the output as below. If you are unsuccesful, try to run `git push -u origin HEAD` again and make sure that you enter in your github username and the token (as the password) correctly.
180+
181+
{% filename %}command-line{% endfilename %}
182+
```
183+
Counting objects: 6, done.
184+
Writing objects: 100% (6/6), 200 bytes | 0 bytes/s, done.
185+
Total 3 (delta 0), reused 0 (delta 0)
186+
To https://github.com/ola/my-first-blog.git
187+
* [new branch] main -> main
188+
Branch main set up to track remote branch main from origin.
189+
```
161190

162191
<!--TODO: maybe do ssh keys installs in install party, and point ppl who dont have it to an extension -->
163192

0 commit comments

Comments
 (0)