Gitlab shows remote: This server is readonly - gitlab

Can't push the changes to any existing repository (Or) to new repository.
Error while pushing the changes:-
git push -u origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 226 bytes | 226.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: ================================================
remote: This server is readonly
remote: ================================================
To gitlab.domain.com:gitlab-user/test30-jan-2020.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#gitlab.domain.com:gitlab-user/test30-jan-2020.git'
GitLab GUI --> Under Admin--> Settings-->General & Repository settings checked, seems settings are fine.
And GitLab Server gitlab.rb file also doesn't have readonly settings mode enabled.
Any other clue/input to enable write mode?

Server side there was a custom hook /opt/gitlab/embedded/service/gitlab-shell/hooks/pre-receive.d which was preventing the push. Same has been removed it started working.

Related

Unable to push code to fresh Dokku container: unable to apply apparmor profile: apparmor failed to apply profile

On my server I installed dokku and created a new App: myNodeApp
$ dokku apps:create myNodeApp
On my local repo I added the dokku remote and want now to push the existing code to my container, after git add . :
$ git push dokku main
Enumerating objects: 1119, done.
Counting objects: 100% (1119/1119), done.
Delta compression using up to 20 threads
Compressing objects: 100% (760/760), done.
Writing objects: 100% (1119/1119), 92.80 MiB | 11.25 MiB/s, done.
Total 1119 (delta 577), reused 727 (delta 310), pack-reused 0
remote: Resolving deltas: 100% (577/577), done.
-----> Set main to DOKKU_DEPLOY_BRANCH.
-----> Cleaning up...
-----> Building myNodeApp from herokuish
remote: time="2023-02-18T21:02:28Z" level=error msg="error waiting for container: "
remote: docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.
remote: ! Failure extracting app code
remote: ! Removing invalid image tag dokku/myNodeApp:latest
remote: ! App build failed
To serversIP:myNodeApp
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'serversIP:myNodeApp'
(base)
This is a Docker issue. Docker v23 accidentally added a hard dependency on AppArmor, and v23.0.1 implemented an incorrect fix, changing the error message to the one you encountered.
For the moment, the fix is one of:
a) Downgrade Docker to below v23
b) Install the apparmor package (I also had to reboot)
c) Wait for the issue for the new error to get fixed

Dyno won't show up when I push Procfile to master to deploy the app

When trying to deploy my app; (an app for posting 18,982 screenshots to Twitter with a twitterbot I made, trying to run it in the background), I use Windows Command Prompt and I utilize node for pushing code to the master of my app but it I keep getting an error message and my dyno won't show up (even though the Procfile I made includes worker: node server.js
Here is the error message whenever I try to push to master.
F:\xxxxxxxxxxxxxxxx>git push heroku master
Enumerating objects: 18996, done.
Counting objects: 100% (18996/18996), done.
Delta compression using up to 12 threads
Compressing objects: 100% (18988/18988), done.
Writing objects: 100% (18996/18996), 4.38 GiB | 108.26 MiB/s, done.
Total 18996 (delta 6), reused 18992 (delta 5)
remote:
remote: ! Size of checkout and restored submodules exceeds 1 GB. Reduce size and try pushing again.
remote:
To https://git.heroku.com/xxxxxxxxxxxxxxxxx.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/xxxxxxxxxxxxxxxxx.git'
I followed instructions from these tutorials:
Tutorial blog
Video Tutorial
The problem is not in your code.
The problem is that you are trying to upload code which exceeds 1GB....
Size of checkout and restored submodules exceeds 1 GB. Reduce size and try pushing again.
Heroku limit your size to 500MB

git push impossible due to unpacker error

can anyone help me please ? I can't push due to :
C:\projects\MadmaqsSF>git push origin dev
Enumerating objects: 2125, done.
Counting objects: 100% (2125/2125), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1473/1473), done.
Writing objects: 100% (2124/2124), 127.61 MiB | 233.35 MiB/s, done.
Total 2124 (delta 539), reused 2047 (delta 494)
remote: error: inflate: data stream error (invalid stored block lengths)
remote: fatal: pack has bad object at offset 43619424: inflate returned -3
error: remote unpack failed: index-pack abnormal exit
To http://midex/moud/MadmaqsSF.git
! [remote rejected] dev -> dev (unpacker error)
error: failed to push some refs to 'http://midex/moud/MadmaqsSF.git'
I think it's about long file name..
I tried:
git push -f origin dev
Its not a permission issue
Finally i just created a new repository and pushed my work on it. I think the old repo was corrupted.

Running Python Worker on Heroku - Push Failed

my scope is to run a python script (it does scrap text from websites and save it in csv files) in the cloud through cron job.
For this I chose Heroku.
I am stuck because when I try to deploy the worker I get a Push rejection.
Here is what i do:
I put my scrapit.py and Procfile ('worker: node scrapit.py') in a directory.
Then after I create an app in heroku, I send the following commands from the directory of above:
$ heroku login
$ git init
$ heroku git:remote -a app-name-on-heroku
$ git add .
$ git commit -am "nth time :("
$ git push heroku master
I get the following message:
Counting objects: 41, done. Delta compression using up to 4 threads.
Compressing objects: 100% (36/36), done. Writing objects: 100%
(41/41), 12.97 KiB | 0 bytes/s, done. Total 41 (delta 6), reused 0
(delta 0) remote: Compressing source files... done. remote: Building
source: remote: remote: -----> App not compatible with buildpack:
https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info:
https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: remote: ! Push failed remote: Verifying deploy...
remote: remote: ! Push rejected to app-name-on-heroku. remote: To
https://git.heroku.com/app-name-on-heroku.git ! [remote rejected]
master -> master (pre-receive hook declined) error: failed to push
some refs to 'https://git.heroku.com/app-name-on-heroku.git'
after the error I sent this command:
heroku buildpacks:set heroku/python
but still the push gets rejected
Every Heroku buildpack specifies a bin/detect file, which lets the platform know if that buildpack can be used with that app or not.
The python buildpack requires either: requirements.txt, setup.py or Pipfile to be present.
You need to create (and properly configure) one of those files to be able to have your python app built.

Git push - node.js failed to push some refs

I am trying to push a node.js application, but I run into following issue:
Total 226 (delta 25), reused 0 (delta 0)
remote: /usr/share/gems/gems/openshift-origin-node-1.18.0.1/lib/openshift-origin-node/model/application_repository.rb:50:
warning: Insecure world writable dir /var/lib/openshift/532aba62493209b14e000001 in PATH, mode 040777
remote: Stopping NodeJS cartridge
remote: Permission denied - /var/lib/openshift/532aba62493209b14e000001/app-deployments/2014-03-20_02-52-39.976/dependencies/nodejs/node_modules/express
To ssh://532aba62493209b14e000001#myapp-test.openshift.local/~/git/myapp.git/
! [remote rejected] master -> master
(pre-receive hook declined)
error: failed to push some refs to 'ssh://532aba62493209b14e000001#myapp-test.openshift.local/~/git/myapp.git/'
Found that could be a known issue https://bugzilla.redhat.com/show_bug.cgi?id=1054421.
Can anyone help me here?
Thanks.

Resources