GitHub personal access token
Set it and use it with Git
Steps to generate and use GitHub personal access token are given here in brief.
Note
Is your GitHub username is username change every rrkurnova with your username.
Generate
Go to your GitHub profile page, e.g. https://github.com/rrkurnova.
Click on the avatar icon on the top right corner.
Scroll down to find Settings.
Click Settings.
Scroll down to have Developer settings on the left.
Click Developer settings.
Expand Personal access tokens and choose Tokens (classic).
Click Generate new token button on the right.
Choose Generate new token (classic).
Confirm access.
Fill Note field to remind you the purpose of this token, e.g. lecture-notes.
Scroll down and check some option.
Change Expiration to 60 days and check repo and workflow, then scroll down.
Click Generate token button.
Personal access token is created. Save it since it will not display again. Refresh the page.
Now you have only the list of your tokens, but not their value.
Config
Go to Downloads folder again.
Right click, select Show more options, and choose Open Git Bash here.
Type git config --global user.name "Raro Kurnova" then press enter.
Get Sparisoma Viridi’s stories in your inbox
Join Medium for free to get updates from this writer.
Type git config --global user.email "rrkurnova@gmail.com then press enter.
Type git config --list to see the information.
The last two lines show the recently added information.
Clone
Now it is time to clone there repository https://github.com/rrkurnova/lecture-notes. In the Donwloads open Git Bash, type
git clone --recursive https://github.com/rrkurnova/lecture-notes lecture-notesIt will make new folder name lecture-notes inside Downloads.
Copy hugo shortcut to lecture-notes and click the it to open.
And from Git Bash type cd lecture-notes to enter lecture-notes folder.
Now, both cmd and Git Bash are already in lecture-notes folder.
Add to Git
First remove current remote origin
git remote remove originThan add again with <access-token-name> and <access-token-value> as follow
git remote add origin https://lecture-notes:ghp_sf...lhu@github.com/rrkurnova/lecture-notes.gitRemember that the token note was lecture-notes and the value was ghp_sf...lhu.
Edit, commit, push
Edit LICENSE file with right click and Edit with Notepad++.
Now Notepad++ is showing its content.
Change the copyright holder to your name, e.g. Raro Kurnova.
Press CTRL+S to save it. Now to to Git Bash. Type git status to see what are changed.
It shows that LICENSE file is changed. Commit the change with
git commit -a -m "change copyrigh holder"Type again git status.
Now type
git push --set-upstream origin mainto push the change to remote repository in GitHub.
After the first time using git push --set-upstream origin main, the option is no longer need. You can simply type git push.
Now the remote LICENSE file has been changed due to local change pushed to GitHub.








