Authenticating to GitHub.com
The reporitories we created were, by default, public which means anyone can download them. However, uploading is another matter. Bad actors can wreak havoc
- Go to Github.com and login.
- Click on your Avatar in the upper right and choose SETTINGS
- Click on Developer Settings in the left hand menu
- Expand the Personal access tokens menu on the left and choose Tokens (classic)
- At the top, click on Generate new token (choose classic again). You might be asked to authenticate again.
- Give your Token a name (can be anything -
general accessis perfectly fine) - Select the checkbox next to repo to select all items in the repo section.
- Click on Generate Token
COPY THIS TOKEN TO A FILE AND KEEP IT SAFE. YOU CAN NOT ACCESS IT AGAIN AFTER YOU CLOSE THIS WINDOW AND WILL HAVE TO GENERATE A NEW TOKEN.
- Back in your project in Source Tree, click on Settings in the upper right
- Under the Remotes Tab, click on the row for
orginthen click Edit - In the URL / Path box, IN FRONT OF THE EXISTING URL, paste your token followed by an @ sign. The contents of this box will then be
https://token@github.com/whatever/your/site/path/is.git - Click OK then OK to close all the windows.
- Try to Push to Github again.
- If you are still having issues, see your instructor.