0
0

More than 5 years have passed since last update.

gitlabにVMを認識させる

Last updated at Posted at 2018-10-16

1.cloneしたい階層の1つ上の階層に.sshディレクトリを作成

mkdir .ssh

2.git clone するために公開鍵をgitlabに登録する

ssh-keygen

.ssh配下で↑をたたいて、何か聞かれたらEnter押下(おそらく3回

.ssh配下にid_rsa(秘密鍵) id_rsa.pub(公開鍵)が作成される

catでid_rsa.pubを開いて中身をコピー

gitlabにログイン

ProfileSettingsからSSH Keysタブ開く

Keyにコピーしたid_rsa.pubの中身を貼る

任意のTitle入力してAdd key

3.cloneする

git clone -b ブランチ名 git@xxx.xxx.xxx.xxx..git ブランチ名
0
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
0
0