Skip to content

Cannot clone GitHub repository with username/PAT #6453

@zatkowich

Description

@zatkowich

What happened:

I tried to set:

username: <username>
password: <PAT>

which I use in all CI/CD tools.

Of course, using the particular schema for SSH or HTTPS clone.

Instead of cloning successfully, I got following log:

failed to update repo to latest    {"repo-id": "ra-devops", "error": "err: exit status 1, out: fatal: could not read Username for 'https://github.com': No such device or address\n"}                           
github.com/pipe-cd/pipecd/pkg/app/piped/appconfigreporter.(*Reporter).scanAppConfigs                                                                                                                            
    github.com/pipe-cd/pipecd/pkg/app/piped/appconfigreporter/appconfigreporter.go:142                                                                                                                          
github.com/pipe-cd/pipecd/pkg/app/piped/appconfigreporter.(*Reporter).Run                                                                                                                                       
    github.com/pipe-cd/pipecd/pkg/app/piped/appconfigreporter/appconfigreporter.go:120                                                                                                                          
github.com/pipe-cd/pipecd/pkg/app/piped/cmd/piped.(*piped).run.func20                                                                                                                                           
    github.com/pipe-cd/pipecd/pkg/app/piped/cmd/piped/piped.go:557                                                                                                                                              
golang.org/x/sync/errgroup.(*Group).Go.func1                                                                                                                                                                    
    golang.org/x/sync@v0.16.0/errgroup/errgroup.go:93                                                                                                                                                           
failed to check application configurations defined in Git    {"error": "err: exit status 1, out: fatal: could not read Username for 'https://github.com': No such device or address\n"}                         
github.com/pipe-cd/pipecd/pkg/app/piped/appconfigreporter.(*Reporter).Run                                                                                                                                       
    github.com/pipe-cd/pipecd/pkg/app/piped/appconfigreporter/appconfigreporter.go:121                                                                                                                          
github.com/pipe-cd/pipecd/pkg/app/piped/cmd/piped.(*piped).run.func20                                                                                                                                           
    github.com/pipe-cd/pipecd/pkg/app/piped/cmd/piped/piped.go:557                                                                                                                                              
golang.org/x/sync/errgroup.(*Group).Go.func1                                                                                                                                                                    
    golang.org/x/sync@v0.16.0/errgroup/errgroup.go:93                                                                                                                                                           
failed to perform git pull. will retry in the next loop    {"repo-id": "ra-devops", "branch": "main", "error": "err: exit status 1, out: fatal: could not read Username for 'https://github.com': No such device
 or address\n"}                                                                                                                                                                                                 
github.com/pipe-cd/pipecd/pkg/app/piped/eventwatcher.(*watcher).run                                                                                                                                             
    github.com/pipe-cd/pipecd/pkg/app/piped/eventwatcher/eventwatcher.go:187                                                                                                                                    
Try to re-clone because it's more likely to be unable to pull the next time too    {"repo-id": "ra-devops"}                                                                                                     
fetching ra-devops to update the cache                                                                                                                                                                          
found 0 candidates: 0 commit candidates and 0 out_of_sync candidates                                                                                                                                            
cloning a repo from cached one in local    {"repo-id": "ra-devops", "remote": "https://github.com/brightpick/ra-devops.git", "repo-cache-path": "/tmp/gitcache4162258698/ra-devops", "src": "/tmp/gitcache416225
8698/ra-devops", "dst": "/tmp/event-watcher1971650408/ra-devops2509292080"}

What you expected to happen:

Repo being cloned, just like with SSH key.

How to reproduce it:

Try cloning repo using GitHub username/PAT instead of

Environment:

  • piped version: 0.55.0
  • control-plane version: 0.55.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedkind/questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions