DEV Community

alfanfauzy
alfanfauzy

Posted on • Edited on

2 2

How to clone repo from Github

In the last month, my office migrate the Repositories from Gitlab to Github. I try to write this article for sharing and as my documentation.

Disclaimer : I have account in Github before and I use mac Terminal

Step 1

For the first step, I am install Github via Terminal.

brew install gh
Enter fullscreen mode Exit fullscreen mode

wait the process install until see the finished installation.

Step 2

Second step, authenticated with Github Account.

gh auth login
Enter fullscreen mode Exit fullscreen mode

follow the instruction until authenticate with Github Account

Screenshoot gh auth login

Step 3

Third step, create ssh-keygen to set to Github Account so we can clone the repo.

ssh-keygen
Enter fullscreen mode Exit fullscreen mode

The file will create in folder /Users/yourname/.ssh/. From this step will be generate 2 file id_rsa and id_rsa.pub

Copy text file from id_rsa.pub with command

pbcopy < ~/.ssh/id_rsa.pub
Enter fullscreen mode Exit fullscreen mode

Paste text info your account Github.

Last

After following all step, in the last step. I just clone the repo with command

git clone <repo link>
Enter fullscreen mode Exit fullscreen mode

But, if you doing this in new computer which is the github/gitlab account didn't setting before. Check with

sss -T git@gitlab.com
Enter fullscreen mode Exit fullscreen mode

Source

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay