Goをアップデートした後、dep updateをしたら以下のようなエラーが発生した。

grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to export github.com/nametake/private-repo: unable to update repository: remote: Repository not found.
fatal: repository 'https://github.com/nametake/private-repo/' not found
: command failed: [git fetch --tags --prune origin]: exit status 128
make: *** [dep] Error 1

原因はprivateリポジトリをhttps経由でcloneしようとしたことだった。

以下のconfig設定をして、githubではhttpsで始まるURLをgitのURLを使うように書き換える設定を追加したら直った。

[url "git@github.com:"]
  insteadOf = https://github.com/

https://git-scm.com/docs/git-config#git-config-urlltbasegtinsteadOf