Prerequisites
Creating an access token
When integrating SCM repositories, you will need an access token you create in GitLab.
Authentication between GitLab and Polaris is managed with an access token that you create in GitLab. If you haven't done so already, create an access token. For additional information: GitLab Docs > GitLab token overview.
Important: Must be created in GitLab SaaS (Premium or Ultimate). Free version does not allow users to create webhooks.
Important: Token must be created by a GitLab Organization Owner or users with the "Manage organization webhooks" permission, who are authorized to manage organization webhooks. Although other GitLab users may be able to select the scope requirements when creating a token, the token will not work due to permission requirements in GitLab to manage organization webhooks.
When creating an access token:- Select your avatar.
- Select Edit profile.
- On the left sidebar, select Access tokens.
- Select Add new token.
- Set the token's expiration date. We recommend setting a maximum expiration period, to avoid issues.
- Select the role (for Project/Group Access Tokens). Select any role above “Guest”.
- Under Select scopes, select read_repository, read_api, write_repository and api.
Important: Store your token in a secure location. Each time you modify a project's SCM integration, you'll need to reenter the token to save your changes.
SCM bulk onboard to create applications and projects
See General Prerequisites before starting.
Customizing onboarding (optional)
SCM bulk onboarding projects into an application
See General Prerequisites before starting.
- On the Portfolio page, select an application by clicking on its name.
- On the Application page, select + Create > New Project(s) with SCM.
- Connect to your SCM:
- Repository Mapping: Select subgroups or repositories to import as new projects from pulldowns. If an arrow is next to a name, you can click to select repositories within it.
- Click Import Repositories.
Next Steps
- Organization Admins can monitor activity in audit logs (My Organization > Audit Logs).
- Change settings or add:
- You can also scan on demand (see How to test from the web UI) or schedule automatic testing on a daily or weekly basis (see Test scheduling policies).Note: From the Tests screen, before beginning a test manually, make sure to test the connection.