GitRepository fails to clone from public repo if secretRef is specified without HTTP creds
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu trong pkg/git/options.go, quanh các dòng 144-146, và tái hiện vấn đề với GitRepository được cung cấp cùng một manifest Secret trống. Theo dõi cách secretRef ảnh hưởng đến việc truyền tải và xác thực; hoàn tất khi một repository công khai được clone thành công với một Secret được tham chiếu nhưng trống, đồng thời thông tin xác thực vẫn hoạt động עבור các repository riêng tư.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When trying to pull from a publicly accessible repo, if the .spec.secretRef.name is specified but the secret itself doesn't contain a username/password, the GitRepository will always fail with failed to checkout and determine revision: unable to clone 'https://github.com/fluxcd/source-controller.git': authentication required.
---
apiVersion: v1
kind: Secret
metadata:
name: git-creds
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: default
secrets:
- name: git
---
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: gitrepo
spec:
secretRef:
name: git-creds
url: https://github.com/fluxcd/source-controller.git
ref:
branch: main
interval: 1m
Our use case is that we have a SSH key and need to template out a bunch of GitRepositories, some of which are private. So instead of adding logic to conditionally template in the SSH secret, we specify the secretRef on all of the GitRepositories with the expectation that the secret is simply ignored for public repos.
I think this is caused by the controller defaulting to assuming ssh transport (and using git as the username) if the secret is specified but no username is found: https://github.com/fluxcd/source-controller/blob/20b26f235e11a9eb6e0784f2598aeffa63a81606/pkg/git/options.go#L144-L146
- Ngôn ngữ chính
- Go
- Star
- 283
- Fork
- 258
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fluxcd/source-controller
-
Improve documentation on debugging the controller locallyCó thể làm lại được @Bryandero98 đã nhận 28 ngày trước và không có pull request nào đang mở. Đang mởarea/docs good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
fluxcd/source-controller#666 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/oci enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
fluxcd/source-controller#2180 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`OCIRepository`/cosign verification: support TSA-only trusted roots (no transparency log) for private Sigstore instances like GitHub Artifact AttestationsCó thể đã có người làm @stealthybox đã nhận 142 ngày trước. Đang mởarea/oci area/security enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
fluxcd/source-controller#2167 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
fluxcd/source-controller#2150 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GitRepository `.spec.ref.commit` + `.spec.ref.branch` does not shallow clone, contrary to the docsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
fluxcd/source-controller#2146 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của fluxcd/source-controller
Issue tương tự
-
os: RawConn methods of a closed File return internal/poll.ErrFileClosing instead of ErrClosedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Bedrock invoke-with-response-stream reports `stop_reason: "end_turn"` for tool-use turnsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
oalders/clodhopper#162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
component/server severity/minor type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
diagnose globalnet reports a failure for every exported headless ServiceCó thể đã có người làm @kurtyoon đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
submariner-io/subctl#1948 ·
Maintainer thường phản hồi trong vòng 1 ngày