[CI/CD] Wiki push changes no permission with Deploy Key

Summary

Hi, the idea it's push docs change in a project to a general project documentation. I use a CI/CD that push to the documetnacion wiki the asccidoc changes. But when the CI/CD do the step the return is:

GitLab: You are not allowed to write to this project's wiki. fatal: Could not read from remote repository.

Steps to reproduce

I create a SSH key and config the public key to the documentation.wiki and the private key to the porject that wants to publish to the documentation wiki. I create a gitlab-ci.yml with then step:

update-doc:
  stage: update-doc
  image: ruby:2.1
  script:
    # Run ssh-agent (inside the build environment)
     # - apk add --no-cache bash git openssh-client
     - eval $(ssh-agent -s)
     # add ssh key stored in SSH_PRIVATE_KEY variable to the agent store
     - ssh-add <(echo "$ssh_doc_key")
     - mkdir -p ~/.ssh
     - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
     - ssh git@gitlab.com
     - git config --global user.name $GITLAB_USER_NAME
     - git config --global user.email $GITLAB_USER_EMAIL
     - git clone git@gitlab.com:<group_repo>/documentation.git
     - cd documentation
     - cp $CI_PROJECT_DIR/src/main/asciidoc/*.adoc .
     - git add .
     - git commit -m "update wiki cobos"
     - git push --force

What is the current bug behavior?

GitLab: You are not allowed to write to this project's wiki. fatal: Could not read from remote repository.

What is the expected correct behavior?

I supossed that wiki permissions have the same access level as the users of the group or the deploy keys added

(What you should see instead)

Greetings.

Edited Sep 03, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading