LoginSignup
2
2

More than 1 year has passed since last update.

Privateリポジトリからgit cloneする方法

Last updated at Posted at 2021-05-23

SSH鍵認証を行っている場合

ssh鍵認証を行っている場合は以下のコードでgit cloneできる

git clone git@github.com:[リポジトリの所有アカウント]/[リポジトリ名].git

SSH鍵認証を行っていない場合

ssh鍵認証を行っていない場合は以下のコードでgit cloneできる

git clone https://[リポジトリの所有アカウント名]@github.com/[リポジトリの所有アカウント]/[リポジトリ名].git

この場合,パスワードの入力が求められる.
なお,git clone https://[リポジトリの所有アカウント名]:[パスワード]@github.com/[リポジトリの所有アカウント]/[リポジトリ名].gitでパスワードの入力を省略できる.

参考文献
- GitHubのプライベートリポジトリをgit clone
- 【Git】チーム開発 メンバーがprivateリポジトリをcloneする手順

2
2
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
2
2