close

[Solved] How to solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job?

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error How to solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job? in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How to solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job Error Occurs?

Today I get the following error How to solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job? in python.

How To Solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job Error ?

  1. How To Solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job Error ?

    To Solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job Error I managed to do this via ssh on a runner by making sure the ssh key is added, and then using the full git url:

  2. How to solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job?

    To Solve the “remote: You are not allowed to upload code.” error on GitLab CI/CD job Error I managed to do this via ssh on a runner by making sure the ssh key is added, and then using the full git url:

Solution 1

The requested URL returned error: 403

  • The HTTP 403 Forbidden client error status response code indicates that the server understood the request but refuses to authorize it.
  • The problem is we cannot provide a valid authentication to git and hence our request is forbidden.
  • Try this:Control Panel => User Accounts => Manage your credentials => Windows Credentials

It worked for me.However I’m not quite sure if it will work for you.

Solution 2

I managed to do this via ssh on a runner by making sure the ssh key is added, and then using the full git url:

task_name:
  stage: some_stage
  script:
    - ssh-add -K ~/.ssh/[ssh key]
    - git push -o ci-skip [email protected]:[path to repo].git HEAD:[branch name]

If it is the same repo that triggered the job, the url could also be written as:

[email protected]$CI_SERVER_HOST:$CI_PROJECT_PATH.git

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read