LoginSignup
0
0

More than 3 years have passed since last update.

【Go】"fatal: 'origin' does not appear to be a git repository" が出ちゃったら…

Posted at

完全に自分のせいですが:laughing:

普段GoプログラミングにはGoLandを使ってるのですが、
"fatal: 'origin' does not appear to be a git repository" エラーが出てプロジェクトがビルドできなくなっちゃいました。
その修復メモです。

何をやったかというと…

  • 諸事情でgithub認証設定を削除してた
  • 今日、Goバージョンを1.14に更新
  • GoLandを起動してプロジェクトを開く
  • そのプロジェクトのgo.modを開いてgo 1.13 -> go 1.14 に書き換え
  • プロジェクト全体の再ビルドが走る
    • requireモジュールの中に1.14合わせで更新が生じるものがあった

:scream::scream::scream:

fatal: 'origin' does not appear to be a git repository

github認証が死んでるままモジュール更新して、
一部モジュールのチェックサムがおかしくなってしまったようです…

修復手順

今回は↓で治りました:laughing:

  • github認証をちゃんと設定
  • ↓のコマンドを実行
$ cd MyHogehogeProject
$ go clean -modcache
$ go get -u
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0