Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-11724

Personal access tokens does not have permission to access SSH keys

XMLWordPrintable

    • 0
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      I would like to get all ssh keys of users that are in a group

      I can list of all users in a group using access token like so

      curl -H "Authorization: Bearer $TOKEN" 'https://$SERVER/rest/api/1.0/admin/groups/more-members?context=$GROUP' | jq
      

      But when i try to get a SSH key for a single user with the same token then I get a permission error.

      curl -H "Authorization: Bearer $TOKEN" 'https://$SERVER/rest/ssh/1.0/keys?user=$USER' | jq
      
      {
        "errors": [
          {
            "context": null,
            "message": "You are not permitted to access this resource",
            "exceptionName": "com.atlassian.bitbucket.AuthorisationException"
          }
        ]
      }
      

      Changing permissions when creating the access token does not change anything.

      We are using Atlassian Bitbucket v6.2.0

            Unassigned Unassigned
            92a66771b7b8 artizirk
            Votes:
            7 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: