1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Rust で GitHub のプライベートリポジトリに依存する場合のメモ

Posted at

Cargo.toml[dependencies] に, GitHub のプライベートリポジトリを指すものがある場合.

GitHub: fine-grained personal access token

まず GitHub アカウントで fine-grained personal access token を作っておく.

コミットにアクセスするために, PermissionsContentsRead and Write を付与しておくこと.

Cargo: net.git-fetch-with-cli

cargo を使う際には, net.git-fetch-with-clitrue に設定する.
環境変数を使う場合は CARGO_NET_GIT_FETCH_WITH_CLI.

コンソールコマンドで都度設定する場合:

cargo --config net.git-fetch-with-cli=true build

GitHub のクレデンシャルを求められるので,
パスワードとして, 上記で取得した fine-grained personal access token を入力する.

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?