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

Github Access Token not supported in checkout step

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • git-plugin
    • None

      When I try to use the checkout step with a credential that contains a GitHub PAT, the checkout fails with:

      [2022-10-25T15:26:27.423Z] hudson.plugins.git.GitException: Command "git fetch --no-tags --progress https://github.com/daos-do/ansible-role-snapshot_host-branch.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
      [2022-10-25T15:26:27.423Z] stdout: 
      [2022-10-25T15:26:27.423Z] stderr: remote: Support for password authentication was removed on August 13, 2021.
      [2022-10-25T15:26:27.423Z] remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
      [2022-10-25T15:26:27.423Z] fatal: Authentication failed for 'https://github.com/daos-do/ansible-role-snapshot_host-branch.git/'
      

      The same thing can be seen in the pipeline snippet generator:

      Which generates the snippet:

      checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'daos_do_repository_access_2021', url: 'https://github.com/daos-do/ansible-role-snapshot_host-branch.git']]])
      

            Unassigned Unassigned
            brianjmurrell Brian J Murrell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: