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?

More than 1 year has passed since last update.

GitLab のリポジトリーをクローンする方法

Last updated at Posted at 2021-11-12

GitLab のリポジトリーをクローンする方法です。

前提条件として、

  1. GitLab にログインできること。
    2)リポジトリーにアクセスできること。
      つまり、ブラウザーで閲覧できること。

ログインした状態で
Edit Profile -> SSH Keys とすすみます。
gitlab_ssh.png

次に書いてある通り、新しくキーを作成しても、普段使っているキーでもどちらでも構いません。とにかく、ssh でログインする時に、相手先のサーバーに送るパブリックキーです。それを、キーの枠にコピーペーストします。そして、Add key ボタンをクリックします。

To add an SSH key you need to generate one or use an existing key.

次は、クローンです。
コマンドは、リポジトリーの Clone をクリックすれば表示されます。
次は、ssh の例です。

git clone git@gitlab.com:someone/something.git

https でクローンするには

~/.netrcにユーザ名/パスワードを書く

text/.netrc
machine gitlab.com
  login scott
  password tigertiger
git clone https://gitlab.com/someone/something.git
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?