I have created a custom Gitlab CI/CD runner. I used project based token.
New-Item -Path 'C:\GitLab-Runner' -ItemType Directory
cd 'C:\GitLab-Runner'
Invoke-WebRequest -Uri "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe" -OutFile "gitlab-runner.exe"
.\gitlab-runner.exe install
.\gitlab-runner.exe start
./gitlab-runner.exe register --url http://gitlab.my-company.net/ --registration-token $REGISTRATION_TOKEN
The token I get from the UI,
But I am getting this error,
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.