0

Within Azure DevOps I am trying to create a Command Line Script which is pushing the actual DevOps Repo to GitLab.

git clone https://xxxx@dev.azure.com/xxxx/DBS/_git/xxx
git remote add --mirror=fetch secondary https://oauth2:%pat%@gitlab.com/username/gitlabrepo.git
git fetch origin
git push secondary --all

In the env parameter %pat% I am referencing the Personal Access Token from GitLab. When running the pipeline with the Comman Line Script I am getting the following error:

start to push repo to gitlab
Cloning into 'gitlabrepo'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/***/gitlabrepo.git/'
##[debug]Exit code: 128
##[debug]Leaving Invoke-VstsTool.
##[error]Cmd.exe exited with code '128'.

How could be this achieved?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.