'gh' is not recognized... -error while trying to create GitHub repo from command prompt

I'm following the instructions on how to add an existing project to GitHub from GitHub docs. However, I get an 'gh' is not recognized as an internal or external command, operable program or batch file. error message when I try to use gh repo create fs1 command in the project root directory as instructed. Here fs1 is my project name. I browsed StackOverflow but couldn't find any help yet. What am I missing?

2 Answers

The page you are following doesn't include the instructions to install the GitHub CLI, so it is likely you don't have it installed (it doesn't come with git as far as I know).

Installation instructions can be found here:

5

I had the same issue. I didn't have gh installed.

I installed the gh, but the same error occurred.

I checked the environment variables and gh location was there.

I restarted windows, the error went away :)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like