0

I am setting a Pipeline for a Salesforce project and wants to create a Job that refreshes a particular branch with Master Branch and PUSH it back to the remote GitLab repo hosted inside our data centre. Then the deployment is done in Integration Sandbox. Below is my Jenkins Job(Exceute Shell).

git branch -a
git config --list --show-origin
git checkout validate/cocktail
git pull origin master --force
git push origin validate/cocktail
...sfdx force:source:deploy....

Though I am able to pull code but I am receiving an access error while pushing code to the remote Repo(the last git push command). What could be the potential reason and what should I configure to get the proper access? error :

+ git push origin validate/cocktail
GitLab: You are not allowed to push code to this project.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights

1 Answer 1

1

From the error message obtained it looks like you do not have privilege to push to the gitlab repository.

Make sure that you have read/write permissions to the gitlab repository. There is a document that describes privillege your user needs. At minimum if you are not the owner you need developer permissions.

1
  • Thanks Mohith. I have created a Jenkins Job to push the code to my remote repo so I guess it would be the Jenkins user ,no? I have connected GitLab and Jenkins through a webhook. How can I give permission to Jenkins user to the Repo?
    – Chetan
    Feb 11, 2020 at 20:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.