I want to deploy code in a local branch (which is different from master) to balena.
Note that deploying code in the master branch works for me (just tested it).
I have tried again deploying code from my local branch dev_pulseaudio and I am getting same error.
BE02506@20FM-PC0CP7KD MINGW64 ~/balena/active/balena-google-assistant (dev_pulseaudio)
$ git branch
* dev_pulseaudio
master
BE02506@20FM-PC0CP7KD MINGW64 ~/balena/active/balena-google-assistant (dev_pulseaudio)
$ git status
On branch dev_pulseaudio
Your branch is ahead of 'origin/dev_pulseaudio' by 7 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
BE02506@20FM-PC0CP7KD MINGW64 ~/balena/active/balena-google-assistant (dev_pulseaudio)
$ git remote -v
balena gh_janvda@git.balena-cloud.com:gh_janvda/pi3three.git (fetch)
balena gh_janvda@git.balena-cloud.com:gh_janvda/pi3three.git (push)
origin https://github.com/janvda/balena-google-assistant.git (fetch)
origin https://github.com/janvda/balena-google-assistant.git (push)
BE02506@20FM-PC0CP7KD MINGW64 ~/balena/active/balena-google-assistant (dev_pulseaudio)
$ git push balena dev_pulseaudio:master
Enter passphrase for key '/c/Users/IBM_ADMIN/.ssh/id_rsa':
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (21/21), 1.94 KiB | 153.00 KiB/s, done.
Total 21 (delta 13), reused 19 (delta 11)
error: unable to write sha1 filename ./objects/28/c24232ab573f0eb00f9704f835c6b3494a2c25: Permission denied
error: unable to write sha1 filename ./objects/0e/bcd597a229f2255ebd4aeb5fc7bae3eafbff7c: Permission denied
To git.balena-cloud.com:gh_janvda/pi3three.git
! [remote rejected] dev_pulseaudio -> master (unable to migrate objects to permanent storage)
error: failed to push some refs to 'gh_janvda@git.balena-cloud.com:gh_janvda/pi3three.git'
BE02506@20FM-PC0CP7KD MINGW64 ~/balena/active/balena-google-assistant (dev_pulseaudio)
$ git push balena dev_pulseaudio:master --force
Enter passphrase for key '/c/Users/IBM_ADMIN/.ssh/id_rsa':
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (21/21), 1.94 KiB | 79.00 KiB/s, done.
Total 21 (delta 13), reused 19 (delta 11)
error: unable to write sha1 filename ./objects/28/c24232ab573f0eb00f9704f835c6b3494a2c25: Permission denied
error: unable to write sha1 filename ./objects/0e/bcd597a229f2255ebd4aeb5fc7bae3eafbff7c: Permission denied
To git.balena-cloud.com:gh_janvda/pi3three.git
! [remote rejected] dev_pulseaudio -> master (unable to migrate objects to permanent storage)
error: failed to push some refs to 'gh_janvda@git.balena-cloud.com:gh_janvda/pi3three.git'
BE02506@20FM-PC0CP7KD MINGW64 ~/balena/active/balena-google-assistant (dev_pulseaudio)
What version of git are you running in your machine? Can you try reproducing the issue with another git versions, and potentially an environment other than MinGW? The fact that the permissions error messages are not prefixed by remote: makes me think these errors are coming from the repository in your machine (maybe something weird with MinGW?) rather than on the remote one on our servers.
Can you double check that your user has the necessary permissions to write files in .git/objects? i.e. maybe try:
Cool, lets see how it goes. In the mean-time, can you link me to the repo you are using so I can test it from my side? I initially thought it was one of our projects, but I can’t seem to find any called balena-google-assistant
I tried to reproduce the exact same scenario as you, and it all seems fine on git 2.22.0 on macOS Mojave. I’ll continue doing some research but I still think it might be an issue on the client side of things (we’ll see what happens in another computer)
I had the same problem this afternoon, I couldn’t push my code anymore to my application because of the same type of error.
When I created a new application, I could push all commits without any problem.
Eventually I ended up pushing my code - commit by commit - to the existing application.
One commit seemed to cause the error, I removed the commit from my history and recommitted the changes.
worked too.
I wonder if it is something in your balena git repository. To check that (and get working again) you could create a new application and check in as above.
If that fails too the problem is likely in your system, if it succeeds something might be going wrong in your balena repo,
It strongly looks like there is a problem with the 2 commits on my remote Balena git repository. So the problem is not at my end or specific to the changes I have made to my git repository.
See also the comment from @thiver who reported a similar issue.
I also created a new branch not including the 2 commits and that I could push without a problem to balena.
As my colleague mentioned above, can you please share with us more details about the problematic commits? So we can identify the issue and add it as a part of our test suite.
$ git remote add balena jef@git.balena-cloud.com:jef/playerrpi3dev.git
$ git push balena master
Counting objects: 26, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (23/23), done.
Writing objects: 100% (26/26), 40.57 KiB | 2.03 MiB/s, done.
Total 26 (delta 13), reused 12 (delta 2)
error: unable to write sha1 filename ./objects/d8/df1e5045bfa9c6d0010ec85af44ecd56e020c9:
Permission denied
To git.balena-cloud.com:jef/playerrpi3dev.git
! [remote rejected] master -> master (unable to migrate objects to permanent storage)
error: failed to push some refs to 'jef@git.balena-cloud.com:jef/playerrpi3dev.git'
I’ve already tried cloning my “origin” repo again, and adding the “balena” remote, but that did not change anything. Also just experiencing this since this morning (just got in the office).
I did a bunch of changes to my docker-compose.yml file and suspected one of these was the culprit causing some git hooks to fail.
Pushing commit by commit, the failing commit was just a simple addition to an application method.
@nurama can you please do git log -l 20 and paste the output here?
@thiver, can you also please do git log and paste here the problematic commit? Including a couple of commits above and below the problematic one would also be useful.
Hi, I experienced the issue for the first time this morning, as I got in the office. My last successful push was somewhere around 16:00 CET yesterday… I’ve created a simple new commit on top of my previous commit, so no strange things there…
Is there some way to “reset” the “remote” git repo so I can push a new, clean version or is there something else I can do?