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
* Update content for user pats and git tokens
Updated content for Manage Git PATs topic to align with Git token reference topic
* Update git-tokens.md
Content edits and formatting fixes
* Update git-tokens.md
* Update git tokens and manage tokens
Added new screenshots and updated content for manage PATs with all options
* Update manage-pats.md
Minor content edits
* Update git token content
Updated comparison table and service account desc based on feedback
* Update git-tokens.md
* Edit content
Minor content edits after more feedback
* Update git-tokens.md
* Update git-tokens.md
description: "Generate, assign, and manage Git user tokens for GitOps Runtimes"
4
4
group: administration
5
5
sub_group: user-self-management
6
6
toc: true
7
7
---
8
8
9
-
As a user in Codefresh, you must authorize access to your Git provider accounts, and authenticate Git-based actions from Codefresh clients, per provisioned runtime.
10
-
The authorization method depends on the Git provider and on what authorization has been set up by your account admin.
11
-
* If your admin has set up authentication with OAuth2, you can authorize access using OAuth2.
12
-
* You can always generate a personal access token from your Git provider and then add the same to Codefresh to authorize access.
9
+
As a user in Codefresh, you must authorize access to your Git provider accounts, and authenticate Git-based actions from Codefresh clients, per provisioned GitOps Runtime. This is done through the Git user token, which is an access token unique to each user. For more details, including required scopes and how the Git user token differs from the Git Runtime token, see [Git tokens in Codefresh]({{site.baseurl}}/docs/reference/git-tokens/).
13
10
14
-
> If you have access to more than one runtime, you can use the same token for multiple runtimes.
15
-
You must however authorize access individually for each runtime.
11
+
The authorization mode depends on the authorization method set up by your account admin:
12
+
* OAuth2
13
+
If your admin has set up authentication with OAuth2, you can authorize access using OAuth2.
14
+
* Git user access token
15
+
You can always generate a Git user token from your Git provider and then add the same to the GitOps Runtime in Codefresh to authorize access.
16
16
17
-
{::nomarkdown}
18
-
</br>
19
-
{:/}
20
17
21
18
22
-
## Authorize Git access in Codefresh
23
-
Authorize Git access with OAuth2 if your account admin has set up Codefresh as an OAuth application, or alternatively through personal access tokens from your Git provider.
24
-
>Notes:
25
-
For OAuth2: The adminstrator pre-configures the permissions and expiry date. Once you supply your credentials for authorization, you are automatically directed to the Git Personal Tokens page.
19
+
## Authorize Git access to GitOps Runtimes
20
+
Authorize Git access to GitOps Runtimes with OAuth2 if your account admin has set up Codefresh as an OAuth application, or alternatively through Git user access tokens from your Git provider.
21
+
22
+
If you have access to more than one GitOps Runtime in the same or in different accounts, you can use the same Git user token for all the Runtimes you have access to. _You must however authorize access for each GitOps Runtime individually_.
23
+
24
+
>**NOTE**:
25
+
For OAuth2, the administrator pre-configures the permissions and expiry date. Once you supply your credentials for authorization, you are automatically directed to the Git Personal Tokens page.
26
26
27
27
**Before you begin**
28
28
29
-
Make sure you have:
29
+
Make sure you have:
30
30
* For Bitbucket only, your Bitbucket account username
31
-
* If needed, a _personal access token_ from your Git provider with the required scopes:
1. In the Codefresh UI, on the toolbar, click your avatar, and then select [**Git Personal Access Token**](https://g.codefresh.io/2.0/git-personal-access-token){:target="\_blank"}.
39
-
1. Select the runtime, and then do one of the following:
40
-
* To add a token, select **Add Token**.
41
-
* To update an existing token by replacing it with a new token, select **Update Token**.
42
-
1. For **OAuth2**:
43
-
> If the application is not registered, the button is disabled. Contact your admin for help.
44
-
* Click **Authorize Access to GitHub**.
45
-
* Enter your credentials, and select **Sign In**.
46
-
* Complete the verification if required, as when two-factor authentication is configured, for example.
47
-
<!---add new screenshot> -->
48
-
38
+
1. Select the GitOps Runtime to authenticate to, and then click **Add Token**.
39
+
1. Do as needed:
40
+
* For **OAuth2**:
41
+
1. Click **Authorize Access to GitHub**.
42
+
1. Enter your credentials, and select **Sign In**.
43
+
1. Complete the verification if required, as when two-factor authentication is configured, for example.
44
+
* For **Git user access tokens**:
45
+
1. Expand **Advanced authorization options**.
46
+
1. For Bitbucket, enter your **Bitbucket username**.
47
+
1. In the **Personal Access Token** field, paste the token you generated.
alt="Authorize access to GitOps Runtime with OAuth/Git user token"
55
+
caption="Authorize access to GitOps Runtime with OAuth/Git user token"
56
+
max-width="50%"
57
+
%}
49
58
50
-
For **Git personal access tokens**:
51
-
* Expand **Advanced authorization options**.
52
-
* For Bitbucket, enter your **Bitbucket username**.
53
-
* In the **Personal Access Token** field, paste the token you generated.
59
+
{:start="4"}
60
+
1. Click **Add Token**.
61
+
In the Git Personal Access Tokens list, you can see that the new token is assigned to the GitOps Runtime.
54
62
55
-
<!---add new screenshot> -->
63
+
## Manage Git user tokens for GitOps Runtimes
64
+
Once you authorize access to one or more GitOps Runtimes through OAuth or Git user tokens, the GitOps Runtimes and their associated tokens are listed in the Git Personal Access Tokens page.
56
65
66
+
**Manage Git user access tokens**
67
+
You can manage Git user tokens for any GitOps Runtime, without affecting the GitOps Runtime at the account-level. Deleting the Git user token for a GitOps Runtime will deny _you_ access to the Git repositories, Git Sources and other resources associated with that Runtime, while the Runtime itself is not affected.
57
68
58
-
{:start="4"}
59
-
1. Click **Add Token**.
60
-
In the Git Personal Access Tokens list, you can see that the new token is assigned to the runtime.
69
+
**Notifications for GitOps Runtimes**
70
+
If you have turned on notifications for GitOps Runtimes, Codefresh alerts you to GitOps Runtimes with invalid or expired Git personal access tokens.
71
+
You can turn off these notifications for selectively for Runtimes for which these alerts are less critical.
61
72
62
-
{::nomarkdown}
63
-
</br>
64
-
{:/}
73
+
**Before you begin**
74
+
Heve your Git user token handy
65
75
66
-
### Generate GitHub personal access tokens
76
+
**How to**
77
+
1. In the Codefresh UI, on the toolbar, click your avatar, and then select [**Git Personal Access Token**](https://g.codefresh.io/2.0/git-personal-access-token){:target="\_blank"}.
78
+
1. To replace/delete the Git user token for a Runtime, do one of the following:
79
+
* To replace, click **Add Token**, and then either click **Authorize Access to Git provider** for OAuth2, or paste your Git user token into the **Git Personal Access Token** field.
80
+
* To delete, click **Delete Token**. The token is deleted and the **Add Token** button is displayed next to the Runtime.
81
+
1. To turn off notifications, click the context menu at the right of the row with the Runtime and enable **Hide notifications**.
Copy file name to clipboardExpand all lines: _docs/administration/user-self-management/user-settings.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,15 @@ redirect_from:
8
8
toc: true
9
9
---
10
10
11
-
As a Codefresh user, you can manage several settings in your personal account, including:
11
+
As a Codefresh user, you can manage several settings and resources through your personal account, including:
12
12
13
13
* Email notifications for builds and build usage
14
-
* Select date and time formats for pipeline modules
15
-
* Get updates on weekly usage
16
-
* Grant account access to Codefresh support
17
-
* Grant access to private Git repositories
18
-
* Create and manage API keys
14
+
* Date and time formats for pipeline modules
15
+
* Updates on weekly usage
16
+
* Account access to Codefresh support
17
+
* API keys
19
18
20
-
> To manage Git personal access tokens for GitOps, see [Managing PATs]({{site.baseurl}}/docs/administration/user-self-management/manage-pats).
19
+
> To manage Git user personal access tokens for GitOps, see [Managing Git PATs]({{site.baseurl}}/docs/administration/user-self-management/manage-pats).
21
20
22
21
## Access user settings
23
22
* In the Codefresh UI, on the toolbar, click the **Settings** icon and then select [**User Settings**](https://g.codefresh.io/user/settings){:target="\_blank"}.
0 commit comments