Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75582

Add possibility to get token from gitea API token

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Critical Critical
    • 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
                        ''')
         }
      } 

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

              Created:
              Updated: