Difference between revisions of "GitHub"

From UConn PAN
Jump to navigation Jump to search
(Blanked the page)
Tag: Blanking
Line 1: Line 1:
 +
<font size="3">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).</font>
  
 +
== <u>The Setup</u> ==
 +
 +
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:
 +
<ol>
 +
  <li>Sign up for a GitHub account by going to the [https://github.com/ GitHub website] and create a new account.</li>
 +
  <li>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.</li>
 +
    <ul>
 +
      <li>The repository name will be your folder name on gluey (see below)</li>
 +
      <li>Repository description is optional</li>
 +
      <li>Repository Setting:</li>
 +
        <ul>
 +
          <li>Private vs. Public</li>
 +
          <li>License (optional) - MIT License is well known and least restrictive</li>
 +
          <li>You can add a README file</li>
 +
          <li>And more ...</li>
 +
        </ul>
 +
    </ul>
 +
  <li>Once the repository is setup online, add a Personal Access Token</li>
 +
    <ul>
 +
      <li>At the top-right of the GitHub website click on the pull-down and select "Settings"</li>
 +
      <li>On the left select "Developer settings" located at the bottom </li>
 +
      <li>Then on the left select "Personal access tokens"</li>
 +
      <li>Select "Fine-grained tokens" or "Tokens (classic)", I did the prior one</li>
 +
        <ul>
 +
          <li>For the Fine-grained token you will need to select which permissions you'd like to allow (not sure about the classic token)</li>
 +
          <li>Select a period for the token to be valid, upto 90 days maximum (I believe)</li>
 +
          <li>Once complete it will provide you with the token you can copy, this will be used in place of your password later</li>
 +
        </ul>
 +
    </ul>
 +
  <li>Clone your repository</li>
 +
    <ul>
 +
      <li>Log in to gluey using a VNC and navigate to the location in your annex where you'll be working</li>
 +
        <ul>
 +
          <li>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</li>
 +
        </ul>
 +
      <li>Type the command: <i><b>git clone https://github.com/your-username/your-repository.git</b></i> where you'll replace "your-username" with your GitHub username and "your-repository" with the name of your repository.</li>
 +
 +
 +
      <li>Then on the left select "Personal access tokens"</li>
 +
      <li>Select "Fine-grained tokens" or "Tokens (classic)", I did the prior one</li>
 +
        <ul>
 +
          <li>For the Fine-grained token you will need to select which permissions you'd like to allow (not sure about the classic token)</li>
 +
          <li>Select a period for the token to be valid, upto 90 days maximum (I believe)</li>
 +
          <li>Once complete it will provide you with the token you can copy, this will be used in place of your password later</li>
 +
        </ul>
 +
    </ul>
 +
 +
 +
 +
 +
 +
 +
 +
</ol>

Revision as of 21:33, 22 May 2023

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:

  1. Sign up for a GitHub account by going to the GitHub website and create a new account.
  2. 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 ...
  3. 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
  4. 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