CygWinでgo get
Windowsにgoをインストールすれば、cygwin上でもgoの実行が可能ですが、go getを実行するには、GOPATHの設定が必要です。
cygwinでのGOPATHの設定
cygwinでのGOPATHの設定はexportコマンドで以下の様に行います
$ export GOPATH=d:\\cygwin\\home\\username\\go
go getのための設定
加えて以下の設定を行っておくと困らないと思います。
githubの設定
~/.ssh/id_rsa_githubにSSH KEYを配置
~/.ssh/config を以下のように設定
Host github.com
User git
Hostname github.com
IdentityFile /home/username/.ssh/id_rsa_github
httpsで処理できるように証明書を配置
http://curl.haxx.se/docs/caextract.html
から最新のcacert.pemをダウンロードして
~/.ssh/cacert.pem
に配置
~/.gitconfigを以下のように設定
[user]
email = [email protected]
name = yourname
[http]
sslcainfo = ~/.ssh/cacert.pem
動作確認
$ go get github.com/golang/example/hello
$ go get github.com/golang/example/hello
Author And Source
この問題について(CygWinでgo get), 我々は、より多くの情報をここで見つけました https://qiita.com/yKanazawa/items/4d2eef4c7814a23b5056著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .