Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`dependency add` and `project build` do not support Git HTTPS authentication for private dependencies

オープン
#370 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

Start with the dependency add and project build command entry points, then compare their dependency access with dependency update-cache, which already exposes the Git HTTPS credential options. Verify both commands read CROSSPLANE_GIT_TOKEN and CROSSPLANE_GIT_USERNAME, support the documented workflow, and keep credentials out of project files, URLs, logs, and errors.

索引モデルが issue の本文から書いたものです。

説明

bug
What happened?

Our corporate network cannot access public source-code hosts such as GitHub. We mirror the CRD manifests we need in a private repository on our internal Git server and use that repository as a project dependency.

The CLI cannot authenticate to that repository when it is accessed by crossplane dependency add or crossplane project build.

This leaves us unable to:

  1. Add the Git dependency to a project in the first place.
  2. Build a project when its dependency schemas need to be generated or refreshed.

This is surprising because crossplane dependency update-cache already supports Git-over-HTTPS authentication with:

  • --git-token / CROSSPLANE_GIT_TOKEN
  • --git-username / CROSSPLANE_GIT_USERNAME

The equivalent options are not available to dependency add or project build.

How can we reproduce it?

dependency add rejects the authentication flag:

$ crossplane dependency add --git-token=not-a-real-token
crossplane: error: unknown flag --git-token

The same flag is available on dependency update-cache:

$ crossplane dependency update-cache --help
...
      --git-token=STRING    Token for git HTTPS authentication ($CROSSPLANE_GIT_TOKEN).
      --git-username="x-access-token"
                            Username for git HTTPS authentication ($CROSSPLANE_GIT_USERNAME).

I expect this workflow to work:

export CROSSPLANE_GIT_TOKEN=<read-only-token>

crossplane dependency add \
  https://<git-server>/<organization>/<repository>.git \
  --git-ref main \
  --git-path config/crd/bases

After the dependency has been added, a regular build should also be able to access it:

crossplane project build

Both commands should use credentials supplied through environment variables. Credentials must not be written to crossplane-project.yaml, included in the repository URL, or exposed in logs and error messages.

I would be happy to contribute a fix for this issue.

What environment did it happen in?
  • Crossplane CLI version: v2.5.0
  • Platform: linux/amd64
  • Crossplane version: not applicable
主要言語
Go
スター
20
フォーク
33
平均マージ
4日 9時間
マージ済み PR(30日)
16

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

crossplane/cli のほかの issue

crossplane/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。