Diary

Diary

日々学んだことをアウトプットする場として初めてみました

SSH接続でGitに大容量ファイルをpushできない

SSH接続でGitに大容量ファイルをpushできない

GitHubssh接続していたのだが、大容量のファイル(といっても2Mくらい)をpushしようとしたときに、次のようなエラーが出た

Enumerating objects: 19, done.
Counting objects: 100% (19/19), done.
Delta compression using up to 4 threads
Compressing objects: 100% (15/15), done.
Connection to github.com closed by remote host.
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

fatal: the remote end hung up unexpectedlyやその上のメッセージなどでググったら「configでBufferのサイズを変えてみたら?」とか出たのでやってみたがうまくいかなかった

そこで、根本的解決ではないかもしれないが、.git/config[remote "origin"]のURLを、HTTPSのものに変えたらうまくいった

[remote "origin"]
-    url = git@git@github.com:~~~  
+    url = https://github.com/~~~