Unable to push core module in Github

frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin main
Enumerating objects: 1542, done.
Counting objects: 100% (1542/1542), done.
Compressing objects: 100% (1098/1098), done.
Writing objects: 100% (1542/1542), 7.82 MiB | 1.60 MiB/s, done.
Total 1542 (delta 398), reused 1485 (delta 373), pack-reused 0
remote: Resolving deltas: 100% (398/398), done.
remote: fatal: did not receive expected object 3fd9c843ccdb0b20e2841b9ddd98a5bfa6367042
error: remote unpack failed: index-pack failed
To Mohtashim-1/Frappe-HR · GitHub
! [remote rejected] main → main (failed)
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (51918/51918), done.
error: refs/remotes/upstream/HEAD: invalid sha1 pointer 0000000000000000000000000000000000000000
dangling commit 0d3e70a3563bb8376057a064dd6b1142f7d5e014
dangling tree 9a7429817d435cfd9e12521e03f30794caf4bde7
frappe@mohtashim:~/frappe-bench/apps/hrms$ git fetch origin
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin main
Enumerating objects: 1542, done.
Counting objects: 100% (1542/1542), done.
Compressing objects: 100% (1098/1098), done.
Writing objects: 100% (1542/1542), 7.82 MiB | 1.83 MiB/s, done.
Total 1542 (delta 398), reused 1485 (delta 373), pack-reused 0
remote: Resolving deltas: 100% (398/398), done.
remote: fatal: did not receive expected object 3fd9c843ccdb0b20e2841b9ddd98a5bfa6367042
error: remote unpack failed: index-pack failed
To Mohtashim-1/Frappe-HR · GitHub
! [remote rejected] main → main (failed)
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git init
Reinitialized existing Git repository in /home/frappe/frappe-bench/apps/hrms/.git/
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -f origin main
Enumerating objects: 1542, done.
Counting objects: 100% (1542/1542), done.
Compressing objects: 100% (1098/1098), done.
Writing objects: 100% (1542/1542), 7.82 MiB | 2.03 MiB/s, done.
Total 1542 (delta 398), reused 1485 (delta 373), pack-reused 0
remote: Resolving deltas: 100% (398/398), done.
remote: fatal: did not receive expected object 3fd9c843ccdb0b20e2841b9ddd98a5bfa6367042
error: remote unpack failed: index-pack failed
To Mohtashim-1/Frappe-HR · GitHub
! [remote rejected] main → main (failed)
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin master
error: src refspec master does not match any
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push --no-thin
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin main

frappe@mohtashim:~/frappe-bench/apps/hrms$ git gc
git push --no-thin
Enumerating objects: 35397, done.
Counting objects: 100% (35397/35397), done.
Compressing objects: 100% (9510/9510), done.
Writing objects: 100% (35397/35397), done.
Total 35397 (delta 17890), reused 35173 (delta 17698), pack-reused 0
Checking connectivity: 51293, done.
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin main

frappe@mohtashim:~/frappe-bench/apps/hrms$ git push --no-thin
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin main

frappe@mohtashim:~/frappe-bench/apps/hrms$ git gc
Enumerating objects: 35397, done.
Counting objects: 100% (35397/35397), done.
Compressing objects: 100% (9318/9318), done.
Writing objects: 100% (35397/35397), done.
Total 35397 (delta 17890), reused 35397 (delta 17890), pack-reused 0
Checking connectivity: 51293, done.
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin main

frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin main
Enumerating objects: 1542, done.
Counting objects: 100% (1542/1542), done.
Compressing objects: 100% (1077/1077), done.
Writing objects: 100% (1542/1542), 7.82 MiB | 1.60 MiB/s, done.
Total 1542 (delta 401), reused 1477 (delta 394), pack-reused 0
remote: Resolving deltas: 100% (401/401), done.
remote: fatal: did not receive expected object 3fd9c843ccdb0b20e2841b9ddd98a5bfa6367042
error: remote unpack failed: index-pack failed
To Mohtashim-1/Frappe-HR · GitHub
! [remote rejected] main → main (failed)
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git pull
Auto packing the repository in background for optimum performance.
See “git help gc” for manual housekeeping.
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=origin/<branch> main

frappe@mohtashim:~/frappe-bench/apps/hrms$ git remote add origin Mohtashim-1/Frappe-HR · GitHub
error: remote origin already exists.
frappe@mohtashim:~/frappe-bench/apps/hrms$ git branch -M main
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin main
Enumerating objects: 1542, done.
Counting objects: 100% (1542/1542), done.
Compressing objects: 100% (1077/1077), done.
Writing objects: 100% (1542/1542), 7.82 MiB | 1.90 MiB/s, done.
Total 1542 (delta 401), reused 1477 (delta 394), pack-reused 0
remote: Resolving deltas: 100% (401/401), done.
remote: fatal: did not receive expected object 3fd9c843ccdb0b20e2841b9ddd98a5bfa6367042
error: remote unpack failed: index-pack failed
To Mohtashim-1/Frappe-HR · GitHub
! [remote rejected] main → main (failed)
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin master
error: src refspec master does not match any
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git status
On branch main
nothing to commit, working tree clean
frappe@mohtashim:~/frappe-bench/apps/hrms$ git branch =M master
fatal: Not a valid object name: ‘master’.
frappe@mohtashim:~/frappe-bench/apps/hrms$ git branch -M master
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin master
Enumerating objects: 1542, done.
Counting objects: 100% (1542/1542), done.
Compressing objects: 100% (1077/1077), done.
Writing objects: 100% (1542/1542), 7.82 MiB | 1.47 MiB/s, done.
Total 1542 (delta 401), reused 1477 (delta 394), pack-reused 0
remote: Resolving deltas: 100% (401/401), done.
remote: fatal: did not receive expected object 3fd9c843ccdb0b20e2841b9ddd98a5bfa6367042
error: remote unpack failed: index-pack failed
To Mohtashim-1/Frappe-HR · GitHub
! [remote rejected] master → master (failed)
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git config --global pack.windowMemory “100m”
git config --global pack.packSizeLimit “100m”
git config --global pack.threads “1”
frappe@mohtashim:~/frappe-bench/apps/hrms$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (35397/35397), done.
error: refs/remotes/upstream/HEAD: invalid sha1 pointer 0000000000000000000000000000000000000000
dangling commit 0d3e70a3563bb8376057a064dd6b1142f7d5e014
dangling tree 9a7429817d435cfd9e12521e03f30794caf4bde7
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin master
Enumerating objects: 1542, done.
Counting objects: 100% (1542/1542), done.
Compressing objects: 100% (1077/1077), done.
Writing objects: 100% (1542/1542), 7.82 MiB | 2.06 MiB/s, done.
Total 1542 (delta 401), reused 1477 (delta 394), pack-reused 0
remote: Resolving deltas: 100% (401/401), done.
remote: fatal: did not receive expected object 3fd9c843ccdb0b20e2841b9ddd98a5bfa6367042
error: remote unpack failed: index-pack failed
To Mohtashim-1/Frappe-HR · GitHub
! [remote rejected] master → master (failed)
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$ git gc
Enumerating objects: 35397, done.
Counting objects: 100% (35397/35397), done.
Compressing objects: 100% (9318/9318), done.
Writing objects: 100% (35397/35397), done.
Total 35397 (delta 17890), reused 35397 (delta 17890), pack-reused 0
frappe@mohtashim:~/frappe-bench/apps/hrms$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (35397/35397), done.
error: refs/remotes/upstream/HEAD: invalid sha1 pointer 0000000000000000000000000000000000000000
dangling commit 0d3e70a3563bb8376057a064dd6b1142f7d5e014
dangling tree 9a7429817d435cfd9e12521e03f30794caf4bde7
frappe@mohtashim:~/frappe-bench/apps/hrms$ git push -u origin master
Enumerating objects: 1542, done.
Counting objects: 100% (1542/1542), done.
Compressing objects: 100% (1077/1077), done.
Writing objects: 100% (1542/1542), 7.82 MiB | 2.53 MiB/s, done.
Total 1542 (delta 401), reused 1477 (delta 394), pack-reused 0
remote: Resolving deltas: 100% (401/401), done.
remote: fatal: did not receive expected object 3fd9c843ccdb0b20e2841b9ddd98a5bfa6367042
error: remote unpack failed: index-pack failed
To Mohtashim-1/Frappe-HR · GitHub
! [remote rejected] master → master (failed)
error: failed to push some refs to ‘Mohtashim-1/Frappe-HR · GitHub
frappe@mohtashim:~/frappe-bench/apps/hrms$

Are you attempting to push code to the Frappe HRMS GitHub repository?

No i am adding it to my local repo

Before you give

git push -u origin master

Try giving

git checkout -b master

There was a src error where master branch was not found, this might solve that, let’s see if you face any other issues.

Expanded Security Maintenance for Applications is not enabled.

47 updates can be applied immediately.
38 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

3 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm

Last login: Tue Apr 23 07:33:05 2024
frappe@mohtashim:~$
frappe@mohtashim:~$ ls
frappe-bench get-docker.sh insights snap
frappe@mohtashim:~$ cd frappe-bench/apps/
frappe@mohtashim:~/frappe-bench/apps$ ls
doppio expense_tracker hrms movie_tickets
erpnext frappe insights payments
erppowersoft frappe_types limit_app resent_integration
frappe@mohtashim:~/frappe-bench/apps$ cd erppowersoft/
frappe@mohtashim:~/frappe-bench/apps/erppowersoft$ ls
erppowersoft license.txt README.md setup.py
erppowersoft.egg-info MANIFEST.in requirements.txt
frappe@mohtashim:~/frappe-bench/apps/erppowersoft$ git checkout -b master

Switched to a new branch ‘master’
frappe@mohtashim:~/frappe-bench/apps/erppowersoft$ git push -u
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin master

frappe@mohtashim:~/frappe-bench/apps/erppowersoft$ git push -u origin master
Username for ‘https://github.com’: Mohtashim-1
Password for ‘https://Mohtashim-1@github.com’:
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see About remote repositories - GitHub Docs for information on currently recommended modes of authentication.
fatal: Authentication failed for ‘GitHub - Mohtashim-1/Frappe-App-For-Limiting-Users
frappe@mohtashim:~/frappe-bench/apps/erppowersoft$

issused does not solve.

Okay, you gave
git push -u origin master
Which is correct for the initial commit.

But I believe you gave your github login password as the password for push. Github removed password support long ago, now you need to create personal access tokens for the repo you’re trying to push.

Go to your github account, click on your profile, go to developer setting, fine grain access token, create new access token, select the repo you want this token to be used for, give the necessary permissions (I just give everything related to workflow actions), then once the token is created, try giving that as the password when you give git push.

use ( git fetch --unshallow ) before pushing origin …this worked for me