You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pipelines/scripts/git-commands.md
+31-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ ms.custom: seodec18
4
4
description: Learn how you can run a Git command in a build script for your workflow by using Azure Pipelines or Team Foundation Server (TFS)
5
5
ms.topic: conceptual
6
6
ms.assetid: B5481254-F39C-4F1C-BE98-44DC0A95F2AD
7
-
ms.date: 03/22/2019
7
+
ms.date: 12/22/2020
8
8
monikerRange: '>= tfs-2015'
9
9
---
10
10
@@ -36,6 +36,34 @@ Git is available on [Microsoft-hosted agents](../agents/hosted.md) and on [on-pr
36
36
37
37
### Grant version control permissions to the build service
38
38
39
+
::: moniker range=">= azure-devops-2020"
40
+
41
+
1. Go to the project settings page for your organization at **Organization Settings** > **General** > **Projects**.
42
+
43
+
:::image type="content" source="media/organization-project-settings.png" alt-text="Select your organization settings. ":::
44
+
45
+
1. Select the project you want to edit.
46
+
47
+
:::image type="content" source="media/select-project.png" alt-text="Select your project. ":::
48
+
49
+
1. Within **Project Settings**, select **Repositories** in the navigation. Select the repository in which you want to run Git commands
50
+
51
+
1. Select **Permissions** to edit your repository permissions.
52
+
53
+
:::image type="content" source="media/modify-repo-permissions.png" alt-text="Choose Permissions to edit your repository permissions. ":::
54
+
55
+
1. Search for **Project Collection Build Service**. By default, this identity can read from the repo but cannot push any changes back to it. Grant permissions needed for the Git commands you want to run. Typically you'll want to grant:
56
+
57
+
* **Create branch:** Allow
58
+
* **Contribute:** Allow
59
+
* **Read:** Allow
60
+
* **Create tag:** Allow
61
+
62
+
63
+
::: moniker-end
64
+
65
+
::: moniker range="<= azure-devops-2019"
66
+
39
67
Go to the <a data-toggle="collapse" href="#expando-version-control-permissions">Version Control control panel tab ▼</a>
0 commit comments