2021年1月20日星期三

Azure DecOps push to GitLab

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?

https://stackoverflow.com/questions/65808820/azure-decops-push-to-gitlab January 20, 2021 at 07:39PM

没有评论:

发表评论