3

I want to clone my public repository from Github to my local system using gh official cli.

I copied the following command from the repo (green code button) button and also followed the official documentation -

sudo gh repo clone <username>/<repo-name>

But the repository does not clone, but instead, the command returns the following output on the terminal.

Welcome to GitHub CLI!

To authenticate, please run `gh auth login`.

I also executed gh auth login and logged in. But still, the command returns the same output.

I can clone the same repository using following command

git clone "url"

I am using Ubuntu 18.04. How can I clone the repository using gh.

Devashish Prasad
  • 1,227
  • 1
  • 13
  • 25

3 Answers3

1

Try the command without sudo : gh repo clone (username)/(repo-name). If login is successfully done, this should work. For reference you can check[1].

[1]make git clone with sudo

0

You will face this problem if you install gh using snap. More about this issue here.

Solution

Install gh using official sources - https://github.com/cli/cli/blob/trunk/docs/install_linux.md#official-sources

Devashish Prasad
  • 1,227
  • 1
  • 13
  • 25
-1

if then ">" probably if then "~>"

trying to work out Ganache principles for symbolic logic using UC Berkeley style.

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 26 '22 at 14:04