gitlab pipeline failed to run

30 Views Asked by At

I am trying to add commit task in the gitlab It basically it executes a ansible playbook on load balancers.

deploy_staging:
  stage: deploy
  
  script:

    - export ANSIBLE_CONFIG=./loadbalancers/ansible.cfg

    - ansible-playbook -i ./loadbalancers/inventory.yml ./loadbalancers/show-runconfig.yml

    - cd /repositories/network-management/loadbalancers/backup_configs
    - git config --global user.name "user"
    - git config --global user.email "[email protected]"
    - CI_REPOSITORY_URL https://gitlab-ci-token:glpat-xfdsfdsfadah@gitlabcom/ops/network-management.git/
    - git add .
    - git commit -m "Update A10 Load Balancer configurations"
    - git push origin main

thats how pipeline looks like. but when it commit it in the project repository root. I can see error message in the pipelines saying:

remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://gitlab.blacksunplc.com/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied fatal: Authentication failed for 'https://gitlab.blacksunplc.com/ops/network-management.git/'

0

There are 0 best solutions below