How can one make files in an Azure DevOps repository publicly accessible?

笑着哭i 提交于 2021-01-27 23:41:16

问题


Is it possible to get a raw link to a file or path that is hosted in our Azure DevOps repository; like we can share on GitHub?


回答1:


Not at present time. VSTS is intended to be a private code repository for teams, not public.

You can always push your repos to GitHub as well as VSTS if you want to provide public code.




回答2:


Yes, this is possible if your project is defined as public; the API that allows one to do this is documented here.

An example from one of my public repos: https://dev.azure.com/ByteTerrace/CSharp/_apis/git/repositories/ByteTerrace.Maths.BitwiseHelpers/Items?path=%2FProject%2FBitwiseHelpers.cs&recursionLevel=0&versionDescriptor.version=master&versionDescriptor.versionOptions=0&versionDescriptor.versionType=0&includeContent=true&resolveLfs=true

Finally, here is the parameterized version; for convenience: https://dev.azure.com/{OrganizationName}/{ProjectName}/_apis/git/repositories/{RepositoryName}/Items?path={PathToFile}&recursionLevel=0&versionDescriptor.version=master&versionDescriptor.versionOptions=0&versionDescriptor.versionType=0&includeContent=true&resolveLfs=true



来源:https://stackoverflow.com/questions/46303201/how-can-one-make-files-in-an-azure-devops-repository-publicly-accessible

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!