Dear “remote-modules” group owners,
Could you grant me access to this group?
Thanks!
Done by @sdinot !
Cédric
Now, I need some other powers. Here is what I have when trying to push:
remote: GitLab:
remote: A default branch (e.g. master) does not yet exist for remote_modules/functor-application-template
remote: Ask a project Owner or Maintainer to create a default branch:
remote:
remote: Sign in · GitLab
remote:
To git@gitlab.orfeo-toolbox.org:remote_modules/functor-application-template.git
! [remote rejected] master → master (pre-receive hook declined)
error: failed to push some refs to ‘git@gitlab.orfeo-toolbox.org:remote_modules/functor-application-template.git’
Hi @remi.cresson,
I just carried out the following test:
-
I created a new user (zebulon)
-
I created a new group (test), configured as “Remote Modules” group.
-
I added “zebulon” to the members of the “test” group, giving him the “developer” role (like you in “Remote Modules” group)
-
Logged as “zebulon”, I created a new project (test-git-push) and I imported an existing repository:
$ git clone git@gitlab.orfeo-toolbox.org:orfeotoolbox/otb-devutils.git $ git remote set-url origin git@gitlab.orfeo-toolbox.org:test/test-git-push.git $ git push --all --set-upstream Enumerating objects: 25223, done. Counting objects: 100% (25223/25223), done. Delta compression using up to 4 threads Compressing objects: 100% (6514/6514), done. Writing objects: 100% (25223/25223), 8.26 MiB | 11.91 MiB/s, done. Total 25223 (delta 18368), reused 25216 (delta 18361) remote: Resolving deltas: 100% (18368/18368), done. To gitlab.orfeo-toolbox.org:test/test-git-push-2.git * [new branch] master -> master Branch 'master' set up to track remote branch 'master' from 'origin'.
It worked! So, I don’t understand the problem you met. Can you detail me what are the commands that you executed?
I put these commands:
git clone git@gitlab.orfeo-toolbox.org:remote_modules/functor-application-template.git
cd functor-application-template
touch README.md
git add README.md
git commit -m “add README”
git push origin master
It looks a lot like https://stackoverflow.com/questions/52026119/unable-to-push-files-to-git-due-to-failed-to-push-some-refs
@remi.cresson I pushed the initial commit!
Arghh
git clone git@gitlab.orfeo-toolbox.org:remote_modules/functor-application-template.git
cd functor-application-template/
echo " " > README.md
git add README.md
git commit -m “DOC: edit README”
git push origin master
Tels me:
Counting objects: 3, done.
Writing objects: 100% (3/3), 248 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: You are not allowed to push code to protected branches on this project.
To git@gitlab.orfeo-toolbox.org:remote_modules/functor-application-template.git
! [remote rejected] master → master (pre-receive hook declined)
error: failed to push some refs to ‘git@gitlab.orfeo-toolbox.org:remote_modules/functor-application-template.git’
remote: GitLab: You are not allowed to push code to protected branches on this project.
I modified the repository configuration to unprotect the master branch.
@remi.cresson master is protected (was). If by default it takes the configuration of otb you won’t be able to push into develop neither…