使用AZ DevOps CLI的回复级安全权限?

发布于 2025-02-01 17:10:49 字数 143 浏览 5 评论 0原文

是否可以通过AZ DevOps CLI(对于Ex:Az DevOps安全权限命令)在回购级别设置REPO安全设置,以便项目中的特定用户(和Admin)只能可见/可访问回购?

我本质上是在寻找命令,该命令将授予特定用户访问特定repo @ repo-level

Is it possible through az devops CLI (for ex: az devops security permissions commands) to set repo security settings at the repo level so that a repo may only be visible/accessible to specific users (and admin) in the project?

I am essentially looking for commands which will grant a specific user access to a specific repo @ repo-level

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿忘心安 2025-02-08 17:10:49

我实际上是在寻找命令,该命令将授予特定用户访问特定repo @ repo-level

您可以使用az devops security permission update Azure Cli and use 2e9eb7ed-3c0a-47d4- 87C1-0FFDD275FD87作为ID参数:

az devops security permission update --id 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87
                                     --subject
                                     --token
                                     [--allow-bit]
                                     [--deny-bit]
                                     [--detect {false, true}]
                                     [--merge {false, true}]
                                     [--org]

是否有可能通过AZ DevOps CLI在回购级别设置回购安全设置,以便项目中的特定用户只能可见/可访问回购?

是的。这是一个例子。请用您自己的信息替换括号及其内容:

az devops security permission update --id 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87 --subject {email address or group descriptor} --token repoV2/{project id}/{repository id}/ --allow-bit 2 --merge true

请注意- 允许位2。数字2请参阅读取存储库的许可。

因此,如果要让用户/组可以访问存储库,则需要使用- 允许位2。如果要让用户/组无法访问存储库,则需要使用- deny-bit 2

I am essentially looking for commands which will grant a specific user access to a specific repo @ repo-level

You can use az devops security permission update Azure Cli and use 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87 as the id parameter:

az devops security permission update --id 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87
                                     --subject
                                     --token
                                     [--allow-bit]
                                     [--deny-bit]
                                     [--detect {false, true}]
                                     [--merge {false, true}]
                                     [--org]

Is it possible through az devops CLI to set repo security settings at the repo level so that a repo may only be visible/accessible to specific users in the project?

Yes. Here is an example. Please replace the braces and their contents with your own information:

az devops security permission update --id 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87 --subject {email address or group descriptor} --token repoV2/{project id}/{repository id}/ --allow-bit 2 --merge true

Please notice the --allow-bit 2. The number 2 refer to the Read permission of a repository.

So if you want to let a user/group can access to a repository, you need to use --allow-bit 2. If you want to let a user/group cannot access to a repository, you need to use --deny-bit 2.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文