Categories
Tips & Tricks

Copy the SSH Key from Macbook Pro

As an enthusiastic developer, there are times when I need to collaborate with other people on projects that hosted in a central repository such as GitHub, Bit Bucket, or Gitlab.

Without the need to always type in the password on push, I need to add my SSH Key to that repository the enable it to recognize my development machine. In my case, I use mac.

Generating the key

In case you’re on a brand new Macbook and which has not yet generated a key before. To generate, open the terminal and run the following command:

ssh-keygen -t rsa -b 4096

Hit enter to accept the default location. Then once it prompts you to enter a passphrase, enter it or leave it blank to never require a passphrase on committing to the remote repository.

The next step is to copy the key and use it at your repository’s account profile.

Copying the key

Open the terminal and run the following command:

pbcopy < ~/.ssh/id_rsa.pub

By Vannkorn

I am a WordPress lover. I make my living using WordPress.

Leave a Reply

Your email address will not be published. Required fields are marked *