Skymero
Skymero

Reputation: 11

Why am I not able to git push to my repository?

I'm experiencing issues with pushing/publishing my new branch to a GitHub repository using Git.

Edit: I'm discovering that I'm getting this issue with all of my branches in this repo. I've also tested other repositories and they are pushing changes as they should.

Despite increasing the http.postBuffer value to 1 GB, I'm still getting the following error message:

PS C:\path\ git push --set-upstream origin working_branch_app --verbose
Pushing to https://github.com/Skymero/WoundSize.git
Enumerating objects: 44290, done.
Counting objects: 100% (44290/44290), done.
Delta compression using up to 16 threads
Compressing objects: 100% (35065/35065), done.
Writing objects: 100% (44276/44276), 701.84 MiB | 124.79 MiB/s, done.
Total 44276 (delta 9221), reused 38538 (delta 7978), pack-reused 0 (from 0)
POST git-receive-pack (735935268 bytes)
error: RPC failed; curl 55 Send failure: Connection was reset
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date

I've tried troubleshooting the issue by checking the GitHub status page, my network connection, and using a different internet service provider, but the issue persists.

I've attempted the following commands based on a few other posts regarding this issue and suggestions from ChatGPT:

2 git push --set-upstream origin working_branch_app
   3 git push origin main^8:main
   4 git config --global core.compression 0
   5 git push --set-upstream origin working_branch_app
   6 git config --global http.postBuffer 157286400
   7 git push --set-upstream origin working_branch_app
   8 git config http.postBuffer 524288000
   9 git push --set-upstream origin working_branch_app -f
  10 git remote add origin [email protected]:Skymero/WoundSize.git
  11 git remote add origin https://github.com/Skymero/WoundSize.git
  12 git remote -v
  13 git fetch
  14 git push
  15 git push --set-upstream origin working_branch_app
  16 git remote remove origin
  17 git remote add origin https://github.com/Skymero/WoundSize.git
  18 git push --set-upstream origin main
  19 git push --set-upstream origin working_branch_app
  20 git init
  21 git push --set-upstream origin working_branch_app
  22 git config http.postBuffer 2147483648
  23 git push --set-upstream origin working_branch_app
  24 git add --all
  25 git commit -m "temp commit"
  26 git push
  27 git help config
  28 Get-History
  29 git --version
  30 git config --global --reset
  31 git config --global --unset-all
  32 git config --global --unset
  33 git config --global -l
  34 git config --global --unset http.postBuffer
  35 git push --set-upstream origin working_branch_app
  36 git ls-remote origin
  37 git fetch
  38 git fetch origin
  39 git log origin/working_branch_app
  40 git push --set-upstream origin working_branch_app --verbose
  41 git config --global http.postBuffer 1048576000
  42 git push --set-upstream origin working_branch_app --verbose

I'm using Git version 2.34.1 on Windows 10.

I've also tried pushing the changes using the --verbose flag, but it doesn't provide any additional information that would help diagnose the issue.

Has anyone else experienced this issue? Any help or guidance would be greatly appreciated.

Other Stackoverflow posts that seemed the most useful for this issue:


Update:

Adjusted Git's Pack and Buffer settings:

git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m"
git config --global pack.threads "1"
git config --global http.postBuffer 209715200  # 200 MB

Then realized there was no SSH key setup for some reason and generated a new one.

Test-Path ~/.ssh/id_rsa.pub
ssh-keygen -t rsa -b 4096 -C "[email protected]"

Ensured that the ssh agen was running and then added the private ssh key to the agent:

Start-Service ssh-agent
ssh-add ~/.ssh/id_rsa

tested connection:

ssh -T [email protected]

Finally I tried another push attempt but I get the following error:

PS C:\Users\USER\WoundSize\WoundSize> git push origin main --force 
Enumerating objects: 46274, done.
Counting objects: 100% (46274/46274), done.
Compressing objects: 100% (37861/37861), done.
Writing objects: 100% (46274/46274), 871.98 MiB | 9.33 MiB/s, done.
Total 46274 (delta 10659), reused 38766 (delta 7161), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (10659/10659), done.
remote: warning: File .venv/Lib/site-packages/cv2/cv2.pyd is 71.00 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File efficientnetb3_deepskin_semantic.zip is 73.94 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File checkpoints/efficientnetb3_deepskin_semantic.h5 is 80.71 MB; this is larger than GitHub's recommended maximum file size of 50.00 M 
remote: warning: File .venv/Lib/site-packages/clang/native/libclang.dll is 80.10 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: Trace: b881d3427e8c252783de34646ff6dc1637854a7dc76f497bebbb38bb8e2bebc3
remote: error: See https://gh.io/lfs for more information.
remote: error: File .venv/Lib/site-packages/tensorflow/python/_pywrap_tensorflow_internal.pyd is 943.41 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:Skymero/WoundSize.git
 ! [remote rejected]   main -> main (pre-receive hook declined)
error: failed to push some refs to 'github.com:Skymero/WoundSize.git'

Ended up solving one error only to find another. For this error, I tried way too many things with no results. In the end I ended up deleting everything from my PC and cloning the repo again since I didn't have any major changes to add.


Unfortunately this solution was not THE solution. After fixing the issue, I generated a new venv and installed some packages I needed, but then I get the following error which is weird to me considering that I've installed these packages before and I've never had these issues. It's obvious that it's talking about not letting it go through due to large files, but again, I've installed these same packages in other projects without issues, and I double checked by testing those other projects. At this point I'm stuck. I've also tried adding the files it complains about to my .gitignore file but they are not being gitignored either.

(.myenv) PS C:\Users\USER\WoundSize> git push
Enumerating objects: 13253, done.
Counting objects: 100% (13253/13253), done.
Compressing objects: 100% (9613/9613), done.
Writing objects: 100% (13251/13251), 1.22 GiB | 8.44 MiB/s, done.
Total 13251 (delta 3231), reused 12484 (delta 2639), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (3231/3231), completed with 1 local object.
remote: warning: File .myenv/Lib/site-packages/clang/native/libclang.dll is 80.10 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: Trace: cbf74495c52182f70af15700a2dbd684700dbe102111ea690952805ba3263cd9
remote: error: See https://gh.io/lfs for more information.
remote: error: File .myenv/Lib/site-packages/tensorflow/python/_pywrap_tensorflow_internal.pyd is 868.21 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:Skymero/WoundSize.git
 ! [remote rejected]   globalmed_branch -> globalmed_branch (pre-receive hook declined)
error: failed to push some refs to 'github.com:Skymero/WoundSize.git'

List of packages I'm trying to install

absl-py==2.1.0
alabaster==0.7.16
asttokens==2.4.1
astunparse==1.6.3
attrs==24.2.0
babel==2.16.0
beautifulsoup4==4.12.3
bleach==6.1.0
certifi==2024.8.30
charset-normalizer==3.3.2
colorama==0.4.6
comm==0.2.2
contourpy==1.3.0
cycler==0.12.1
debugpy==1.8.6
decorator==5.1.1
deepskin @ file:C:/Users/MartinezR/WoundSize/Deepskin
defusedxml==0.7.1
docutils==0.20.1
exceptiongroup==1.2.2
executing==2.1.0
fastjsonschema==2.20.0
filelock==3.16.1
flatbuffers==24.3.25
fonttools==4.54.1
gast==0.6.0
gdown==5.2.0
google-pasta==0.2.0
grpcio==1.66.1
h5py==3.12.1
idna==3.10
imagesize==1.4.1
ipykernel==6.29.5
ipython==8.27.0
jedi==0.19.1
Jinja2==3.1.4
joblib==1.4.2
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
jupyter_client==8.6.3
jupyter_core==5.7.2
jupyterlab_pygments==0.3.0
keras==2.8.0
kiwisolver==1.4.7
libclang==18.1.1
mahotas==1.4.18
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.9.2
matplotlib-inline==0.1.7
mdurl==0.1.2
mistune==3.0.2
ml-dtypes==0.4.1
namex==0.0.8
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nbsphinx==0.8.7
nest-asyncio==1.6.0
numpy==1.26.4
opencv-python==4.10.0.84
opt_einsum==3.4.0
optree==0.12.1
packaging==24.1
pandas==2.2.3
pandocfilters==1.5.1
parso==0.8.4
pillow==10.4.0
platformdirs==4.3.6
pockets==0.9.1
prompt_toolkit==3.0.48
protobuf==4.25.5
psutil==6.0.0
pure_eval==0.2.3
Pygments==2.18.0
pyparsing==3.1.4
PySocks==1.7.1
python-dateutil==2.9.0.post0
pytz==2024.2
pywin32==306
pyzmq==26.2.0
referencing==0.35.1
requests==2.32.3
rich==13.8.1
rpds-py==0.20.0
scikit-learn==1.5.2
scipy==1.14.1
six==1.16.0
snowballstemmer==2.2.0
soupsieve==2.6
Sphinx==7.4.7
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-napoleon==0.7
sphinxcontrib-programoutput==0.17
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
stack-data==0.6.3
tensorboard==2.17.1
tensorboard-data-server==0.7.2
tensorflow==2.8.0
tensorflow-intel==2.8.0
tensorflow-io-gcs-filesystem==0.31.0
termcolor==2.4.0
threadpoolctl==3.5.0
tinycss2==1.3.0
tomli==2.0.1
tornado==6.4.1
tqdm==4.66.5
traitlets==5.14.3
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
wcwidth==0.2.13
webencodings==0.5.1
Werkzeug==3.0.4
wrapt==1.16.0

Upvotes: 0

Views: 241

Answers (1)

Skymero
Skymero

Reputation: 11

Alright. I've got this working now.

I posted this comment on reddit also and had someone give me a bit of advice that I needed to hear.

"You don't use venv between computers, you should always recreate it."

I've always added my virtual environments to my github repos and apparetnly this isn't common practice for obvious reasons that I have been running into.

So I added my venv into the .gitignore file, and I created a bash script to setup the environment.

Turns out this was a noob issue.

Upvotes: 0

Related Questions