1 year ago
#313749
Daniel Procházka
Syncing GitLab to Azure DevOps Git without renewing credentials and/or over SSH
we are currently mirroring our local GitLab repositories to DevOps over https using the generated Git credentials from DevOps on one of our admin accounts, so we can use one credentials for all of the projects without adding the user to all projects. Unfortunately these credentials only last one year and then need to be updated on all of the project we are mirroring, currently around 40 and going up. Also this is not the most secure way to go about it.
We would like to create an user just for the mirroring purposes and I was wondering if we could use classic user authentication and/or SSH keys as an authentication method. So we don't have to update the credentials anymore. Once again we want to setup mirroring from local GitLab server to Azure DevOps git. I was looking for this answer, but its always the other way around. From DevOps to GitLab.
When you want to mirror form GitLab via SSH and input the address from DevOps repository like this one: tenant-name@vs-ssh.visualstudio.com:v3/tenant-name/project/repository
This requires adding the ssh:// to the start of the address in gitlab. Once I click "Detect host keys" I am met with "Invalid URL" error.
I have found something called "Alternate Credentials" in DevOps which would fit exactly our purpose, the problem is that there is a warning message it will no longer be supported from march of 2020. Which was 2 years ago, but appears to be still working.
So is there is way to mirror the repositories without the need to update the credentials every year and if possible, over SSH to make it but more secure? I will be glad for any ideas.
We are using latest GitLab 14.8.4-ee
git
ssh
azure-devops
gitlab
mirroring
0 Answers
Your Answer