Github Implementation
Github Implementation
Setting up GitHub on your system involves a few steps: installing Git, configuring your Git environment, and connecting your local repository
to a GitHub repository. Here’s a step-by-step guide:
On Ubuntu/Debian-based systems:
On CentOS/RHEL-based systems:
On Fedora:
On macOS:
On Windows:
Set up your Git username and email address. This information will be associated with your commits.
To securely connect to GitHub, you can generate an SSH key. This step is optional but recommended for secure communication with
GitHub.
If you are using an older system that doesn’t support the Ed25519 algorithm, use:
2. When prompted to "Enter a file in which to save the key," press Enter to accept the default file location.
3. Add your SSH key to the ssh-agent:
1 ssh-add ~/.ssh/id_rsa
1 cat ~/.ssh/id_ed25519.pub
Or for RSA:
1 cat ~/.ssh/id_rsa.pub
Go to GitHub, navigate to Settings > SSH and GPG keys > New SSH key, and paste the key.
1 cd repository
1 git add .
To update your local repository with changes from the remote repository:
Optional: Setting Up a Personal Access Token (PAT) for HTTPS (if not using SSH)
1. Go to GitHub and navigate to Settings > Developer settings > Personal access tokens > Tokens (classic) > Generate new token.
2. Select the scopes/permissions you need and generate the token.
3. Use this token as your password when pushing/pulling over HTTPS.
When prompted for a password, use the PAT instead of your GitHub password.
By following these steps, you should have GitHub set up and ready to use on your system.