You are on page 1of 2

Chat Summary

How to Save Work on GitHub's Repo Using Git in AlmaLinux 9 VM:

1. Configure Git with your username and email.

2. Create a new repository on GitHub.

3. Initialize your project directory as a Git repository.

4. Add your project files to the repository and commit the changes.

5. Link your local repository to GitHub using HTTPS.

6. To push changes, use a personal access token (PAT) due to GitHub's deprecation of password

authentication for git operations over HTTPS.

Generating a Personal Access Token (PAT) on GitHub:

1. Go to GitHub Settings > Developer settings > Personal access tokens > Generate new token.

2. Select the necessary scopes and generate the token.

3. Use the PAT when prompted for a password during git operations.

Switching from HTTPS to SSH (Optional):

Page 1
Chat Summary

1. Generate an SSH key pair and add it to the ssh-agent.

2. Add the SSH public key to your GitHub account.

3. Change your repository's remote URL to SSH.

4. Push your changes using SSH.

Error Handling:

- Addressed the "remote origin already exists" error by removing and re-adding the remote.

- Discussed the necessity of a separate task for installing the latest kernel when updating all

packages with Ansible.

- Explained how to group tasks in a block and trigger a handler for reboot after block completion.

- Provided solutions for the "fatal: Authentication failed" error by recommending the use of PATs or

SSH keys.

Page 2

You might also like