Skip to content

Latest commit

 

History

History
117 lines (72 loc) · 7.41 KB

1-Environment-Setup.MD

File metadata and controls

117 lines (72 loc) · 7.41 KB

Ensure Your Repo Is Local

Using whatever method you generally follow, ensure your repo is on your local machine.

Here is what cloning my repo ooked like as per here:

image

If you have already created branches in GitHub, you will need to follow this procedure for downloading all of your branches - it does not automatically bring down the other branches.

At this point when I ran what was here, I got this:

image

Created a new issue here.

By searching You are in 'detached HEAD' state. You can look around, make experimental in Google, found this StackOverflow article ... Which lead me to this aticle in the Git web space.

Here's how I fixed it:

image

You can confirm it was successful by running:

image

In this project I also had to set up the upstream for main - but ran into issues. See: Issue #14

You'll just need to:

  1. run git checkout main
  2. run git push -u origin main

Prepare Your Environment

Ensure you have python installed. For this project, we are using 3.6.5 versiom.

Virtual Environment Setup

It is always best practice to complete your projects in their own virtual environment. Therefore, we will follow this doc - specifically:

  • the virtualenv section
  • the virtualenvwrapper section, which will make things SO awesome (my favorite reason being that when you turn on the virtual machine, it takes you directly in to the folder your project is stored in)

Unfortunately, the following is for Windows only. I'm not sure what it is for Linux/Mac users.

  1. Open a command prompt - your keyboard shortcut for this is: WINDOWS KEY + r

    It looks something like this: image

  2. Change into the directory where your repo is. In this example, I ran: cd "C:\Users\Kat\Documents\Programming\repo\ExpoBoothSchedule"

  3. As per this, I then ran: mkproject ExpoBoothSchedule

image I chose to name my project and thus virtual environment after my GitHub repo name.

You are now in your new virtual environment!

NOTE: Step 4 may be unnecessary, butI didn't realize it until after I ran it. I was basing these steps off of old cheat sheets of mine.

  1. I then ran the following: setprojectdir setprojectdir "C:\Users\Kat\Documents\Programming\repo\ExpoBoothSchedule"

image

To turn off the virtual environment, you would run: deactivate

Return To Next Step's Branch

At this point we are ready to begin creatimg bare bones.

Use git to enter into your repo. Then move into a new branch. For this project, I created the following as per here:

`git checkout -b BareBones`

This was supposed to also setup a connection to the upstream but did not appear to do so as shown by running git push:

image

Turns out there was a change in authentication on August 13, 2021 - less than 1 month ago!

Logon failed, use ctrl+c to cancel basic credential prompt.
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/ProsperousHeart/ExpoBoothSchedule.git/'

image

Looks like we needed to:

  1. Create a personal access token (PAT)
  2. Remove the Windows credential for GitHub as outlined here
  3. Using Git Credential Manager Core (local git) supposed to store the creds .... but the Git documentation doesn't explain how to store it AFTER you've already cloned it. So ...

Since we can at least move forward (and there's currently no indication of an issue getting data between local git repo and GitHub, I will simply leave these potential related links:

Once a Personal Access Token was created, used it and my username to be able to authenticate in my CLI.

After that, still had to set upstream so in the BareBones branch, ran: git push -u origin BareBones

Then ensure that the main branch is updated & BareBones is a "fresh" copy by running:

git checkout main
git pull
git checkout BareBones
git merge main BareBones
git push

Install Necessary Modules

Be sure that your virtual environment is on and that you have installed your proper modules. If you're not sure, you can run: pip list