GitHub
GitHub is a web-based platform that provides hosting of coding repositories. It offers a centralized location for people to store, manage, and allow collaboration on their code. It is especially useful for version control and project tracking. The following information is geared towards linking gluey annex repositories with GitHub, but can easily be used to link your home computer to a GitHub repository. This wiki page is being updated as the author learns how to use GitHub, so if you know a better, more efficient way to accomplish a task then by all means please do it that way (... and add an addendum to this page if you have a login).
The Setup
Create a new repository: Once you're logged in, click on the "+" sign at the top-right corner of the GitHub homepage and select "New repository." Give your repository a name and optionally provide a description.
Choose repository settings: On the new repository page, you can customize various settings. You can make the repository public or private, add a license, initialize it with a README file, and choose other options as per your preference.
Clone the repository: After creating the repository, you'll want to clone it to your local machine. To do this, you'll need to have Git installed on your computer. Open a terminal or command prompt and navigate to the directory where you want to store your code. Then, run the following command:
- Sign up for a GitHub account by going to the GitHub website and create a new account.
- Once you're logged in, click on the "+" sign at the top-right corner of the GitHub homepage and select "New repository" to create a new repository. Give your repository a name and provide a description.
- The repository name will be your folder name on gluey (see below)
- Repository description is optional
- Repository Setting:
- Private vs. Public
- License (optional) - MIT License is well known and least restrictive
- You can add a README file
- And more ...
- Once the repository is setup online, add a Personal Access Token
- At the top-right of the GitHub website click on the pull-down and select "Settings"
- On the left select "Developer settings" located at the bottom
- Then on the left select "Personal access tokens"
- Select "Fine-grained tokens" or "Tokens (classic)", I did the prior one
- For the Fine-grained token you will need to select which permissions you'd like to allow (not sure about the classic token)
- Select a period for the token to be valid, upto 90 days maximum (I believe)
- Once complete it will provide you with the token you can copy, this will be used in place of your password later
- Clone your repository
- Log in to gluey using a VNC and navigate to the location in your annex where you'll be working
- You can do the same for your home computer, you'll just need to open a terminal or command prompt and navigate to the directory where you want to store your code
- Type the command: git clone https://github.com/your-username/your-repository.git where you'll replace "your-username" with your GitHub username and "your-repository" with the name of your repository.
- Then on the left select "Personal access tokens"
- Select "Fine-grained tokens" or "Tokens (classic)", I did the prior one
- For the Fine-grained token you will need to select which permissions you'd like to allow (not sure about the classic token)
- Select a period for the token to be valid, upto 90 days maximum (I believe)
- Once complete it will provide you with the token you can copy, this will be used in place of your password later