0

We use devops boards and repos and we currently have a consultant for a framework we use. I'd like for this repo to be shared with read access only if possible. E.g. he should be able to clone / update the repo but not much else.

This consultant does not have a devops license i think. Is there any way i can share my code hosted in devops repos to this consultant?

sommmen
  • 6,570
  • 2
  • 30
  • 51

2 Answers2

2

If you have a public project, you could add him as a Stakeholder for free (learn.microsoft.com).

If it's private, you can add him as a basic user (as long as you have less than 5 users it's free!) or alternatively:

You could generate a PAT and just:

git clone https://<anything>:<your-pat-here>@dev.azure.com/<organization>/<project>/_git/<repo>

So one can access the repository locally without having access to DevOps.

DSpirit
  • 2,062
  • 16
  • 22
1

Agree with DSpirit.

We can generate a PAT token and configure the permission scope, then share the PAT with consultant to clone the repo.

share my code hosted in devops repos to this consultant

Also, we can Change the project type to public in the project setting or create a new public project and clone current repo to the public project and then share the public project link with consultant, consultant can access the repo in the Azure DevOps.

enter image description here

Vito Liu
  • 7,525
  • 1
  • 8
  • 17
  • Thanks answering. Let me get this straight, public repos can be viewed by non-logged in users, but changes can only be made when logged in. I can share a link to the repo but a) will the consultant be able to clone the repo without logging in? and b) will the public project then be publicly accessible via e.g. google - or will it show up somewhere? The code is company property so i don't want it ending up in the internet. – sommmen Sep 09 '20 at 07:21
  • a. The consultant can clone the repo without logging in but cannot update the repo. b. If we set the project public, an [anonymous user](https://learn.microsoft.com/en-us/azure/devops/organizations/public/glossary-public?view=azure-devops#anonymous-user) or [public user](https://learn.microsoft.com/en-us/azure/devops/organizations/public/glossary-public?view=azure-devops#public-user) can view the contents of your public project via the project URL. – Vito Liu Sep 09 '20 at 07:39