tektoncd / tektoncd/pipelines-as-code

`tkn pac create repo` does not work as expected while using PAC with GHE

Open
#1,583 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority/high
Dominant language
Go
Stars
214
Forks
144
Avg merge
2d 11h
Merged PRs (30d)
27

Description

Expected Behaviour :

  • While using pac via Github App, after Github App is installed, while running tkn pac create repo command it should directly generate the pipelinerun yaml and create the repository CR

Actual Behaviour:

  • While using pac via Github App, after Github App is installed, while running tkn pac create repo command it does not generate the pipelinerun yaml and also asks for access token

Steps to reproduce

  • Run tkn pac bootstrap --github-api-url https://ghe.xxx.com/
  • Run tkn pac create repo . After that while executing it asks for personal access token which it should not ask ideally
 tkn pac create repo                                                                                    
? Enter the Git repository url (default: https://ghe.xxx.com/pac/test-incoming-webhook):  
? Please enter the namespace where the pipeline should run (default: test-incoming-webhook-pipelines): 
! Namespace test-incoming-webhook-pipelines is not found
? Would you like me to create the namespace test-incoming-webhook-pipelines? Yes
✓ Repository pac-test-incoming-webhook has been created in test-incoming-webhook-pipelines namespace
? Please select the type of the git platform to setup webhook: github  👈🏻  Ideally it should skip from here 
✓ Setting up GitHub Webhook for Repository https://ghe.xxx.com/pac/test-incoming-webhook
👀 I have detected a controller url: https://controller.url.com/
? Do you want me to use it? Yes
? Please enter the secret to configure the webhook for payload validation (default: xxxxx):  xxxxx
ℹ ️You now need to create a GitHub personal access token, please checkout the docs at https://is.gd/KJ1dDH for the required scopes
? Please enter the GitHub access token:  
Error: interrupt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the tkn pac bootstrap and tkn pac create repo entry points and reproduce the flow against the GitHub Enterprise URL shown in the issue. Trace why the GitHub App setup still requests a personal access token. Done means the command generates the PipelineRun YAML, creates the repository CR, and skips the unnecessary token prompt.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, go, kubernetes
Domain
ci-cd, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.