Cannot clone GitHub repository with username/PAT
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 364
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 84
Description
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:
pipedversion: 0.55.0control-planeversion: 0.55.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the update and clone paths referenced in pkg/app/piped/appconfigreporter/appconfigreporter.go:120 and :142, then trace the callers in eventwatcher.go:187 and piped.go:557. Reproduce the failure with the reported piped and control-plane versions using a GitHub HTTPS repository and username/PAT credentials; done means the repository clones and updates without prompting for a username.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github, go
- Domain
- authentication, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100