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

  1. Go to Github.com and login.
  2. Click on your Avatar in the upper right and choose SETTINGS
  3. Click on Developer Settings in the left hand menu
  4. Expand the Personal access tokens menu on the left and choose Tokens (classic)
  5. At the top, click on Generate new token (choose classic again). You might be asked to authenticate again.
  6. Give your Token a name (can be anything - general access is perfectly fine)
  7. Select the checkbox next to repo to select all items in the repo section.
  8. Click on Generate Token
IMPORTANT

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.

  1. Back in your project in Source Tree, click on Settings in the upper right
  2. Under the Remotes Tab, click on the row for orgin then click Edit
  3. 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
  4. Click OK then OK to close all the windows.
  5. Try to Push to Github again.
  6. If you are still having issues, see your instructor.