golang “go get” command showing “go: missing Git command” error

后端 未结 5 1913
栀梦
栀梦 2021-02-01 17:22

I\'m new in go lang. Trying to import a go library using \"go get\" command but in cmd getting this error:

go: missing Git command. See https://golang.org/s/goge         


        
5条回答
  •  难免孤独
    2021-02-01 17:56

    The go get fetching of source code is done by using one of the following tools expected to be found on your system either git, svn, hg.

    Install git from this link https://git-scm.com/downloads

    After installing git you should navigate to the environment variables setting and add the path of git.exe(executable file) which is found in the bin. So the path should look like this "C:\Program Files\Git\bin". Restart your IDE and the command should be working.

提交回复
热议问题