Add possibility to get token from gitea API token

XMLWordPrintable

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Critical
    • Component/s: gitea-plugin
    • None

      Giteea is on the way to use token except of credentials.

      So I need to get token from Gitea API token credential with withCredentials, but getting the error:

      ERROR: Credentials 'gitea-api-token' is of type 'Gitea Personal Access Token' where 'org.jenkinsci.plugins.plaincredentials.StringCredentials' was expected 

      My pipeline is (test pipeline):

      node {
         withCredentials([string(credentialsId: 'gitea-api-token', variable: 'TOKEN')]) {
                      sh('''#!/bin/bash -xe
                        echo hello
                        ''')
         }
      } 

            Assignee:
            Sahil
            Reporter:
            Sahil
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: