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/administration/user-settings.md
+67-55Lines changed: 67 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,20 @@ group: administration
5
5
toc: true
6
6
---
7
7
8
-
As a user in Codefresh, you can manage the access tokens defined in your account, and optionally, enable access for Codefresh support.
8
+
As a user in Codefresh, you can manage your account by authorizing access to your Git provider accounts, and optionally, enabling access for Codefresh support.
9
9
10
10
* Enable access for Codefresh support
11
-
12
11
Optional. Enable access to your account for troubleshooting purposes.
13
12
14
-
* Manage Git tokens for authentication
13
+
* Authorize Git providers
14
+
The Git personal token is a user-specific access token, required to authenticate Git-based actions from Codefresh clients, per provisioned runtime.
15
15
16
-
The Git personal token is a user-specific access token per provisioned runtime, and is required to authenticate Git-based actions per runtime in Codefresh.
17
-
If your admin has set up authentication with OAuth2, you can authorize access to GitHub using OAuth2.
18
-
Or, you can always generate a personal access token from GitHub and then add the same to Codefresh to authorize access.
16
+
The authorization method depends on the Git provider and on what authorization has been set up by ypur adin.
17
+
If your admin has set up authentication with OAuth2, you can authorize access using OAuth2.
18
+
Or, you can always generate a personal access token from your Git provider and then add the same to Codefresh to authorize access.
19
19
20
+
> If you have access to more than one runtime, you can use the same token for multiple runtimes.
21
+
You must however authorize access individually for each runtime.
20
22
21
23
### Enable access for Codefresh support
22
24
Enable Codefresh support personnel to access your user account. Access to your account is useful for visibility during troubleshooting.
@@ -38,77 +40,87 @@ You can disable this security setting at any time.
38
40
max-width="50%"
39
41
%}
40
42
43
+
### Authorize Git access with OAuth or personal access tokens
44
+
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.
45
+
* 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.
41
46
47
+
#### Generate personal access token for GitHub
42
48
43
-
### Update/delete Git personal access tokens
44
-
Update your Git personal access token for hosted and hybrid runtimes when needed from the User Settings page.
45
-
To authorize with OAuth2, you have to supply your credentials. When authorized, you are automatically directed to the Git Personal Tokens page.
49
+
#### Authorize access for Bitbucket
50
+
Bitbucket requires your Bitbucket account name and a personal access token to authorize access.
46
51
47
-
* For OAuth2, the permissions and expiry date are pre-configured by the administrator.
48
-
* For Git personal access tokens, when generating a new token, make sure you select `repo` scope for commits and other actions.
52
+
**Generate personal access token**
49
53
54
+
1. Log in to your Bitbucket Cloud or Server account.
Copy file name to clipboardExpand all lines: _docs/reference/git-tokens.md
+71-34Lines changed: 71 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,61 +10,98 @@ toc: true
10
10
11
11
12
12
Codefresh requires two types of Git tokens for authentication:
13
-
* A token per runtime (Git runtime token)
14
-
* A personal access token for each runtime, unique to every user (Git user token)
13
+
* Git runtime token for runtime installation
14
+
Used by:
15
+
* Argo CD clone repositories and pull changes to sync the desired state in Git to the live state on the cluster.
16
+
* Argo Events to create webhooks in Git repositories for Event Sources in Delivery Pipelines
17
+
18
+
The Git runtime token is runtime-specific but not user-specific.
19
+
20
+
21
+
* Git user token, a user-specific personal access token for each runtime, unique to every user
22
+
Unique to every user, the Git user token is used to authenticate the user for client-based actions, such as Git clone and push operations on specific repositories.
23
+
Git user token requirements translate to permission scopes which differ for the different Git providers.
24
+
25
+
After installation, you need to authorize Git access for every provisioned runtime either through OAuth2 or through a personal access token from your Git provider.
26
+
Every user can view the list of runtimes and tokens assigned to each runtime in [User Settings](https://g.codefresh.io/2.0/user-settings){:target="\_blank"}. Codefresh flags and notifies you of invalid, revoked, or expired tokens.
27
+
28
+
15
29
16
-
You can update expired, revoked, or invalid Git runtime and personal user tokens.
17
30
18
31
### Git runtime tokens
19
-
The Git runtime token is required to provision Codefresh runtimes. The Git runtime token is specific to a runtime, and is mandatory for runtime installation.
20
-
An expired, revoked, or invalid Git runtime token is flagged by a notification in the UI. You can then generate a new Git runtime token from your Git provider, and update it in Codefresh.
32
+
The Git runtime token is mandatory for runtime installation.
21
33
22
-
#### Git runtime token permissions
23
-
Git runtime tokens need both repo and admim repo access to create webhooks for Git events.
#### GitHub and GitHub Enterprise runtime token scopes
39
+
40
+
*`repo`
41
+
*`admin:repo_hook`
42
+
43
+
{::nomarkdown}
44
+
</br>
45
+
{:/}
34
46
35
-
#### How to update a Git runtime token
36
-
Update Git runtime tokens when needed.
47
+
#### GitLab Cloud and GitLab Server runtime token scopes
37
48
38
-
**Before you begin**
39
-
*Generate a new runtime token with the correct permissions
49
+
*`api`
50
+
*`read_repository`
40
51
41
-
**How to**
52
+
{::nomarkdown}
53
+
</br>
54
+
{:/}
42
55
43
-
1. In the Codefresh UI, when you see a notification, select **[Update Token]**.
44
-
In the **Runtimes** page, runtimes with invalid tokens are prefixed by the key icon. Mouse over shows invalid token.
45
-
1. Select the runtime, and then on the top-right of the page, select and then **+Add Token**.
46
-
1. Paste the generated personal access token.
47
-
1. If there are no validation errors, select **Add**.
56
+
#### Bitbucket Cloud & Bitbucket Server runtime token scopes
57
+
58
+
*`Project admin`
59
+
*`Repository write`
60
+
*`Project read`
61
+
62
+
{::nomarkdown}
63
+
</br></br>
64
+
{:/}
48
65
49
66
### Git personal tokens
50
-
The Git personal token is a user-specific personal access token per provisioned runtime. Unique to each user, it is required to authenticate Git-based actions per runtime in Codefresh.
51
-
If not provided during runtime installation, user can add personal access tokens (PATs) after installation through [User Settings](https://g.codefresh.io/2.0/user-settings){:target="\_blank"} in the UI, using either OAuth to authorize access or generate one from GitHub.
67
+
The Git personal token is a user-specific personal access token per provisioned runtime. Unique to each user, it is required after installation to authenticate Git-based actions per runtime in Codefresh.
52
68
53
-
If users have access to multiple runtimes, they can use the same personal access token for all the runtimes.
54
-
> Users must configure the token for each runtime.
69
+
> If you have access to multiple runtimes, you can use the same personal access token for all the runtimes.
70
+
You must configure the token for each runtime.
55
71
56
-
#### Git personal token permissions
57
-
Git personal tokens need repo access for commits and other actions.
72
+
{::nomarkdown}
73
+
</br>
74
+
{:/}
58
75
59
-
{% include
76
+
#### GitHub & GitHub Enterprise personal user token scopes
77
+
*`repo`
78
+
79
+
<!---{% include
60
80
image.html
61
81
lightbox="true"
62
82
file="/images/getting-started/github-pat.png"
63
83
url="/images/getting-started/github-pat.png"
64
84
alt="Permissions for Git personal token"
65
85
caption="Permissions for Git personal token"
66
86
max-width="60%"
67
-
%}
87
+
%}-->
88
+
{::nomarkdown}
89
+
</br>
90
+
{:/}
91
+
92
+
#### GitLab Cloud & GitLab Server personal user token scopes
93
+
94
+
*`write_repository` (includes `read-repository`)
95
+
*`api-read`
96
+
97
+
{::nomarkdown}
98
+
</br>
99
+
{:/}
100
+
101
+
#### Bitbucket Cloud & Bitbucket Server personal user token scopes
0 commit comments