
Setting Up SSH & GitHub on Your MacBook 💻
3 min read
Published on: Tue Jun 04 2024
3 min read
Published on: Tue Jun 04 2024
Follow these steps to get started with GitHub on your MacBook:
You can connect to GitHub using the Secure Shell Protocol (SSH), which provides a secure channel over an unsecured network.
GitHub Docs
Git is the version control system that GitHub relies on. If it’s not already installed, follow these steps:
Open the Terminal app (found in the Utilities folder within the Applications folder).
Check if Git is installed:
git --version
If Git is not installed, you will be prompted to install the Xcode Command Line Tools. Follow the prompts to install it.
Verify that Git is installed by running:
git --version
Configure Git with your name and email address:
git config --global user.name "Your Name"
git config --global user.email youremail@example.com
SSH keys provide a secure way to authenticate with GitHub.
Check for existing SSH keys:
ls -al ~/.ssh
Generate a new SSH key:
ssh-keygen -t ed25519 -C "youremail@example.com"
Follow the prompts to create the SSH key (default location: ~/.ssh/id_ed25519
for the private key and ~/.ssh/id_ed25519.pub
for the public key).
Add your SSH key to the SSH agent:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Copy your SSH public key to your clipboard:
pbcopy < ~/.ssh/id_ed25519.pub
Go to your GitHub account settings, navigate to SSH and GPG keys, and click New SSH key. Paste your public key there and save it.
If you don’t have a GitHub account, sign up for one at GitHub.
Create a new repository on GitHub by clicking the New button on the main page of your GitHub account.
To work with an existing repository, clone it to your local machine:
git clone <repository_url>
Replace <repository_url>
with the URL of the GitHub repository you want to clone.
You are now set up to use Git and GitHub on your Mac. Use the git
command to manage your code, and push and pull changes to and from your GitHub repositories.
Remember to replace placeholders like Your Name
, youremail@example.com
, and <repository_url>
with your actual information.
Thank you for reading until the end.
Before you go please consider supporting by giving a Hart, Share, or Follow! 👏
Visit My Site & Projects: Travislord.xyz|Clay Theme - Gatsby 5+|Holo Theme
Share On Social: