正式なドキュメントは英語版であり、この日本語訳はAI支援翻訳により作成された参考用のものです。日本語訳の一部の内容は人間によるレビューがまだ行われていないため、翻訳のタイミングにより英語版との間に差異が生じることがあります。最新かつ正確な情報については、英語版をご参照ください。

Debian

  • プラン: Free、Premium、Ultimate
  • 提供形態: GitLab Self-Managed

このを使用して、Debianパッケージマネージャークライアントとやり取りします。

このは、dputapt-getなどのDebian関連のパッケージクライアントで使用され、通常は手動での使用を意図していません。このは開発中であり、機能が制限されているため、本番環境での使用には適していません。

これらのエンドポイントは、標準の認証方式に準拠していません。どのヘッダーとトークンタイプがサポートされているかの詳細については、Debianレジストリドキュメントを参照してください。 ドキュメントに記載されていない認証方法は、将来削除される可能性があります。記載されていない認証方法は、将来削除される可能性があります。

Debianを有効にする

Debianは、デフォルトで無効になっている機能フラグの背後にあります。GitLab Railsコンソールにアクセスできる管理者は、それを有効にすることができます。有効にするには、Debianを有効にするの手順に従ってください。

Debianグループを有効にする

Debianグループは、デフォルトで無効になっている機能フラグの背後にあります。GitLab Railsコンソールにアクセスできる管理者は、それを有効にすることができます。有効にするには、Debianグループを有効にするの手順に従ってください。

Debianパッケージリポジトリへの認証

Debianパッケージリポジトリへの認証を参照してください。

パッケージファイルをアップロードする

Debianパッケージファイルをアップロードします:

PUT projects/:id/packages/debian/:file_name
属性必須説明
id文字列はいプロジェクトのまたはフルパス。
file_name文字列はいDebianパッケージファイルの名前。
distribution文字列いいえディストリビューションコードネームまたはスイート。明示的なディストリビューションとコンポーネントでアップロードするためにcomponentとともに使用されます。
component文字列いいえパッケージファイルのコンポーネント。明示的なディストリビューションとコンポーネントでアップロードするためにdistributionとともに使用されます。
curl --request PUT \
     --user "<username>:<personal_access_token>" \
     --upload-file path/to/mypkg.deb \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/mypkg.deb"

明示的なディストリビューションとコンポーネントでアップロードします:

curl --request PUT \
  --user "<username>:<personal_access_token>" \
  --upload-file  /path/to/myother.deb \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/myother.deb?distribution=sid&component=main"

パッケージをダウンロードする

パッケージファイルをダウンロードします。

GET projects/:id/packages/debian/pool/:distribution/:letter/:package_name/:package_version/:file_name
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
letter文字列はいDebianの分類(先頭文字またはlib-先頭文字)。
package_name文字列はいソースパッケージ名。
package_version文字列はいソースパッケージバージョン。
file_name文字列はいファイル名。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/pool/my-distro/a/my-pkg/1.0.0/example_1.0.0~alpha2_amd64.deb"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/pool/my-distro/a/my-pkg/1.0.0/example_1.0.0~alpha2_amd64.deb" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

ルートプレフィックス

説明されている残りのエンドポイントは、それぞれ異なるスコープでリクエストを行う、同一のルートの2つのセットです:

  • プロジェクトレベルのプレフィックスを使用して、単一のプロジェクトのスコープでリクエストを行います。
  • グループレベルのプレフィックスを使用して、単一のグループのスコープでリクエストを行います。

このドキュメントの例はすべて、プロジェクトレベルのプレフィックスを使用しています。

プロジェクトレベル

/projects/:id/packages/debian
属性必須説明
id文字列はいプロジェクトまたは完全なプロジェクトパス。

グループレベル

/groups/:id/-/packages/debian
属性必須説明
id文字列はいプロジェクトまたは完全なグループパス。

ディストリビューションリリースファイルをダウンロードする

Debianディストリビューションファイルをダウンロードします。

GET <route-prefix>/dists/*distribution/Release
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/Release"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/Release" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

署名付きディストリビューションリリースファイルをダウンロードする

署名付きDebianディストリビューションファイルをダウンロードします。

GET <route-prefix>/dists/*distribution/InRelease
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/InRelease"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/InRelease" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

リリースファイル署名をダウンロードする

Debianのリリースファイル署名をダウンロードします。

GET <route-prefix>/dists/*distribution/Release.gpg
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/Release.gpg"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/Release.gpg" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

パッケージインデックスをダウンロードする

パッケージインデックスをダウンロードします。

GET <route-prefix>/dists/*distribution/:component/binary-:architecture/Packages
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
component文字列はいディストリビューションコンポーネント名。
architecture文字列はいディストリビューションアーキテクチャタイプ。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/binary-amd64/Packages"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/binary-amd64/Packages" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

ハッシュでパッケージインデックスをダウンロードする

ハッシュでパッケージインデックスをダウンロードします。

GET <route-prefix>/dists/*distribution/:component/binary-:architecture/by-hash/SHA256/:file_sha256
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
component文字列はいディストリビューションコンポーネント名。
architecture文字列はいディストリビューションアーキテクチャタイプ。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/binary-amd64/by-hash/SHA256/66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/binary-amd64/by-hash/SHA256/66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

Debianインストーラーパッケージインデックスをダウンロードする

Debianインストーラーパッケージインデックスをダウンロードします。

GET <route-prefix>/dists/*distribution/:component/debian-installer/binary-:architecture/Packages
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
component文字列はいディストリビューションコンポーネント名。
architecture文字列はいディストリビューションアーキテクチャタイプ。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/debian-installer/binary-amd64/Packages"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/debian-installer/binary-amd64/Packages" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

ハッシュでDebianインストーラーパッケージインデックスをダウンロードする

ハッシュでDebianインストーラーパッケージインデックスをダウンロードします。

GET <route-prefix>/dists/*distribution/:component/debian-installer/binary-:architecture/by-hash/SHA256/:file_sha256
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
component文字列はいディストリビューションコンポーネント名。
architecture文字列はいディストリビューションアーキテクチャタイプ。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/debian-installer/binary-amd64/by-hash/SHA256/66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/debian-installer/binary-amd64/by-hash/SHA256/66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

ソースパッケージインデックスをダウンロードする

ソースパッケージインデックスをダウンロードします。

GET <route-prefix>/dists/*distribution/:component/source/Sources
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
component文字列はいディストリビューションコンポーネント名。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/source/Sources"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/source/Sources" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。

ハッシュでソースパッケージインデックスをダウンロードする

ハッシュでソースパッケージインデックスをダウンロードします。

GET <route-prefix>/dists/*distribution/:component/source/by-hash/SHA256/:file_sha256
属性必須説明
distribution文字列はいDebianディストリビューションのコードネームまたはスイート。
component文字列はいディストリビューションコンポーネント名。
curl --header "Private-Token: <personal_access_token>" \
  --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/source/by-hash/SHA256/66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18"

出力をファイルに書き込みます:

curl --header "Private-Token: <personal_access_token>" \
     --url "https://gitlab.example.com/api/v4/projects/1/packages/debian/dists/my-distro/main/source/by-hash/SHA256/66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18" \
     --remote-name

これにより、現在のディレクトリにあるリモートファイル名を使用して、ダウンロードされたファイルが書き込まれます。