I bought a new laptop and I need to configure it properly. In this series, I will guide you, so that you can use if for programming.
In this article, I will guide you on how to install Git bash (adding a user account) and how to connect to GitHub so that you can upload (push) to your cloud GitHub Repo
1. Installing Git Bash:
Go to the official Git website: https://git-scm.com/downloads
2. Setting up a user account in Git:
After installation, open Git Bash and set up your user account with the following commands:
git config --global user.name "Barack Obama"
git config --global user.email "barack@gmail.com"
3. Connecting to GitHub:
Generate an SSH key (if you don't already have one):
ssh-keygen -t ed25519 -C "barack@gmail.com"
Press Enter to accept the default file location. You can choose to set a password or leave it empty. Now, you can start the SSH agent:
eval "$(ssh-agent -s)"
Add your SSH key to the agent:
ssh-add ~/.ssh/id_ed25519
run the following command and then copy the output, this is your public SSH key
cat ~/.ssh/id_ed25519.pub
Add the SSH key to your GitHub account:
- Go to GitHub.com and sign in
- Click on your profile picture in the top right and select "Settings"
- In the left sidebar, click on "SSH and GPG keys"
- Click "New SSH key"
- Give your key a title (e.g., "My New Laptop")
- Paste your public key into the "Key" field
- Click "Add SSH key"
Hopefully, after following the steps stated above, you have successfully linked your computer to GitHub. To test this out, run a git clone command to clone a GitHub repository.
Clone your repository
If you do not have any repository, please feel free to clone mine.
git clone git@github.com:MasterIfeanyi/ifeanyi-coinnest-html.git
Summary
Now you should be all set up with Git Bash, connected to GitHub.
Top comments (1)
i following the steps above and i show an error if i clone any repo from my personall repo in github why
