Add a note about the site_admin scope
* add a note to the readme * add a note to the autogenerated cli help
This commit is contained in:
@@ -25,7 +25,7 @@ When there are machines which have access to both the public internet and the GH
|
|||||||
**Arguments:**
|
**Arguments:**
|
||||||
|
|
||||||
- `actions-admin-user` _(optional)_
|
- `actions-admin-user` _(optional)_
|
||||||
The name of the Actions admin user, which will be used for updating the chosen action. To use the default user, pass `actions-admin`. If not set, the impersonation is disabled.
|
The name of the Actions admin user, which will be used for updating the chosen action. To use the default user, pass `actions-admin`. If not set, the impersonation is disabled. Note that `site_admin` scope is required in the token for the impersonation to work.
|
||||||
- `cache-dir` _(required)_
|
- `cache-dir` _(required)_
|
||||||
The directory in which to cache repositories as they are synced. This speeds up re-syncing.
|
The directory in which to cache repositories as they are synced. This speeds up re-syncing.
|
||||||
- `destination-url` _(required)_
|
- `destination-url` _(required)_
|
||||||
@@ -87,7 +87,7 @@ When no machine has access to both the public internet and the GHES instance:
|
|||||||
**Arguments:**
|
**Arguments:**
|
||||||
|
|
||||||
- `actions-admin-user` _(optional)_
|
- `actions-admin-user` _(optional)_
|
||||||
The name of the Actions admin user, which will be used for updating the chosen action. To use the default user, pass `actions-admin`. If not set, the impersonation is disabled.
|
The name of the Actions admin user, which will be used for updating the chosen action. To use the default user, pass `actions-admin`. If not set, the impersonation is disabled. Note that `site_admin` scope is required in the token for the impersonation to work.
|
||||||
- `cache-dir` _(required)_
|
- `cache-dir` _(required)_
|
||||||
The directory containing the repositories fetched using the `pull` command.
|
The directory containing the repositories fetched using the `pull` command.
|
||||||
- `destination-url` _(required)_
|
- `destination-url` _(required)_
|
||||||
@@ -108,7 +108,7 @@ When no machine has access to both the public internet and the GHES instance:
|
|||||||
|
|
||||||
## Destination token scopes
|
## Destination token scopes
|
||||||
|
|
||||||
When creating a personal access token include the `repo` and `workflow` scopes. Include the `site_admin` scope (optional) if you want organizations to be created as necessary.
|
When creating a personal access token include the `repo` and `workflow` scopes. Include the `site_admin` scope (optional) if you want organizations to be created as necessary or you want to use the impersonation logic for the `push` or `sync` commands.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ func (f *PushFlags) Init(cmd *cobra.Command) {
|
|||||||
|
|
||||||
func (f *PushOnlyFlags) Init(cmd *cobra.Command) {
|
func (f *PushOnlyFlags) Init(cmd *cobra.Command) {
|
||||||
cmd.Flags().StringVar(&f.BaseURL, "destination-url", "", "URL of GHES instance")
|
cmd.Flags().StringVar(&f.BaseURL, "destination-url", "", "URL of GHES instance")
|
||||||
cmd.Flags().StringVar(&f.ActionsAdminUser, "actions-admin-user", "", "A user to impersonate for the push requests. To use the default name, pass 'actions-admin'.")
|
cmd.Flags().StringVar(&f.ActionsAdminUser, "actions-admin-user", "", "A user to impersonate for the push requests. To use the default name, pass 'actions-admin'. Note that the site_admin scope in the token is required for the impersonation to work.")
|
||||||
cmd.Flags().StringVar(&f.Token, "destination-token", "", "Token to access API on GHES instance")
|
cmd.Flags().StringVar(&f.Token, "destination-token", "", "Token to access API on GHES instance")
|
||||||
cmd.Flags().BoolVar(&f.DisableGitAuth, "disable-push-git-auth", false, "Disables git authentication whilst pushing")
|
cmd.Flags().BoolVar(&f.DisableGitAuth, "disable-push-git-auth", false, "Disables git authentication whilst pushing")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user