mbw
mbw

Reputation: 17

Github credentials issue after recreating repo via JFrog Pipeline

I created a JFrog Pipeline that uses a GitHub repo. No issues at all.

I deleted the repo and re-created it. Unless I change the name of the "resource" in the pipelines.yml file, JFrog Pipelines tries to use the old authentication tokens it generated and is not able to connect.

I added a "1" to the end and began working again. This is a bug in the JFrog software and should be addressed.

This does not work:

    resources:
  - name:       Github_Software
    type:       GitRepo
    configuration:
      gitProvider:  Github_Provider
      path:         account/repo
      branches:
        include:    master
      buildOn:
         commit:            True
         pullRequestCreate: False
         pullRequestClose:  False
         releaseCreate:     True
         tagCreate:         False
      cancelPendingRunsOn:
         newCommit:         True
         pullRequestUpdate: True
      cloneProtocol:    ssh

This works fine, by changing the resource name (note the "1" added to the name of "Github_Software," JFrog seems to create new credentials to authenticate to the resource.:

    resources:
  - name:       Github_Software1
    type:       GitRepo
    configuration:
      gitProvider:  Github_Provider
      path:         account/repo
      branches:
        include:    master
      buildOn:
         commit:            True
         pullRequestCreate: False
         pullRequestClose:  False
         releaseCreate:     True
         tagCreate:         False
      cancelPendingRunsOn:
         newCommit:         True
         pullRequestUpdate: True
      cloneProtocol:    ssh

Upvotes: 0

Views: 182

Answers (1)

bjamin
bjamin

Reputation: 143

Unfortunately, deleting a git repository and recreating it isn't an expected workflow. When a git resource is first added to a pipeline, Pipelines sets up all the required webhooks and expects them to exist for that repository in the future.

May I ask why you're deleting and recreating a git repository?

Also, I'd recommend raising issues/bugs at https://jfrog.com/support. That will lead to much faster response times.

Upvotes: 1

Related Questions