@takaiko001

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

GitでSSH接続をする際にエラーがたくさん出る

解決したいこと

Gitを使ってGithubにpushし、大容量のデータをアップロードしたい。

発生している問題・エラー

この返信内容と画像のエラーは、おそらく大容量のデータをアップしてしまったので出来たものだと思うのですが、それにしてはエラーの内容が不自然だと思っております。

C:\Users\Tomomi Hamanaga\Documents\W_website\xampp\htdocs\wordpress>git push origin main
Enumerating objects: 9174, done.
Counting objects: 100% (9174/9174), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6690/6690), done.
Writing objects: 100% (9172/9172), 242.04 MiB | 3.50 MiB/s, done.
Total 9172 (delta 2225), reused 9168 (delta 2224), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (2225/2225), done.
remote: error: Trace: 340dfea217e7fc2abcf9b96f84fae553698659c372c22f50d974e4d363690884
remote: error: See https://gh.io/lfs for more information.
remote: error: File wp-content/ai1wm-backups/localhost-wordpress-20251115-213354-jr6094c1yxlv.wpress is 137.70 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File wp-content/ai1wm-backups/localhost-wordpress-20251127-222401-cnhklfs3fqsf.wpress is 208.69 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File wp-content/ai1wm-backups/localhost-wordpress-20251127-215556-gxm846t60q9a.wpress is 208.69 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File wp-content/ai1wm-backups/localhost-wordpress-20251128-002640-mlbibqxh320d.wpress is 209.24 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File wp-content/ai1wm-backups/localhost-wordpress-20251128-003006-bg1ar0zgkjc0.wpress is 209.24 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
To github.com:takaiko001-ui/secondRepository.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'github.com:takaiko001-ui/secondRepository.git'

説明用05.png

自分で試したこと

大容量なので、細かく分けてアップするべきなのだが、方法がわからない。
https接続がだめでSSH接続をしておりますが、その際に出たエラーです。

どなたか解決方法をご存じのかたはいらっしゃいませんでしょうか。

宜しくお願いいたします。

0 likes

3Answer

まずはエラーメッセージをちゃんと読みましょう。大抵は丁寧にエラーの理由が説明されています。(英語のメッセージだったら機械翻訳で構わないので)

GitHubは主にソースコード(テキストファイル)を置く場所なので、バイナリファイルのようなサイズの大きいファイルはそのままでは保存出来ません。

どうしても巨大なファイルをGitHubの管理下に置きたい場合には、Git LFS という仕組みを使う必要があります。

1Like

Comments

  1. WordPress の .wpress を LFS 管理する意味はないのでignore設定しましょう。

このエラーは SSHの問題ではなく「GitHubの100MB制限に引っかかった」だけです。
ログにそのまま書いてあります。
・File ... .wpress is XXX MB; this exceeds GitHub's file size limit of 100.00 MB
・GH001: Large files detected
・pre-receive hook declined

なので 分割してpushしても無理です(GitHub側が「このコミット群に100MB超が含まれる」時点で弾くため)。
まずやるべきおすすめの方針は
.wpress(All-in-One WP Migration のバックアップ)は リポジトリに入れる意味が薄いので、
 1.今後はコミットしない(.gitignore)
 2.すでにコミット済みなら履歴からも消す(重要)
が王道です。

0Like

Your answer might help someone💌