Hey all, i'm struggling to connect to our Azure De...
# ask-community
a
Hey all, i'm struggling to connect to our Azure Devops Repo using the GIT storage class. I keep getting an HTTP Unauthorized error. I've tried connecting with git credentials and with a PAT and neither work. Has anyone else managed to connect to AZ Devops?
k
Hey @Adam Everington, I have not seen Azure DevOps come up here before. I did see this which was connections to Azure Storage and Azure Container Registry. I don’t know if it’s a similar format. I can try this and get back to you by Monday.
a
Hey Kevin, thanks that would be great, i'll continue to try in the mean time, I know that the connection to Devops can be awkward at the best of times and in other c# apps we have we've had to request a token and then encode and embed that into the request header.
k
Hey man, I have figured out the issue after digging a bit. Basically we form the URL is the params provided and the URL takes this form:
url = f"https://{self.git_token_secret}@{self.repo_host}/{self.repo}.git"
This works for Github, Bitbucket, and Gitlab where the Git repo cloning ends in
.git
. For Azure DevOps though, the URL looks something like this:
working_url = "<https://kdykho@dev.azure.com/kdykho/prefect/_git/prefect>"
That ending
.git
causes the URL to fail, but azure devops has a different URL. I’ll chat with an engineer about how to go about this.
@Marvin open “Git Storage is Currently Incompatible with Azure DevOps”
a
Great, thanks for the help @Kevin Kho!
k
This will be looked at this week
a
Great, this is hugely appreciated
156 Views