Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 46,535
    • Issues 46,535
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,507
    • Merge requests 1,507
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #378244
Closed
Open
Issue created Oct 18, 2022 by Antoine Dunn@MinDBreaK🔃

Cannot create a deploy token on repository : "Scopes can't be blank"

Summary

While creating a deploy token on a repository, I receive the error "Scopes can't be blank" even when scopes are selected

Steps to reproduce

  • Go to a repository
  • Enter repository Settings
  • Go to deploy token section
  • Create a deploy token
  • Give it a name
  • Add scopes
  • Save it
  • Error : "Scopes can't be blank"

Example Project

What is the current bug behavior?

An error message stating that "Scopes can't be blank" is displayed despite having two selected

What is the expected correct behavior?

The token is created and no error is displayed

Relevant logs and/or screenshots

Interface screenshot :

image

Bellow the cURL request (stripped out of token and cookies) extracted from developer tool.

curl 'https://gitlab.com/groupe1/group2/projects/-/settings/repository/deploy_token/create' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'X-CSRF-Token: <csrf token>' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Content-Type: application/json' \
-H 'Origin: https://gitlab.com' \
-H 'Connection: keep-alive' \
-H 'Cookie: <cookies>' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'TE: trailers' \
--data-raw '{"deploy_token":{"expires_at":"2022-10-17T22:00:00.000Z","name":"CI release","read_repository":false,"read_registry":false,"username":""}}'

Output of checks

This bug happens on GitLab.com. This was tested on Firefox 105.0.3 (64-bit) on Ubuntu 22.04.

/label reproduced on GitLab.com

Results of GitLab environment info

Gitlab.com

Results of GitLab application Check

Expand for output related to the GitLab application check

Gitlab.com

Assignee
Assign to
Time tracking