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 5 years have passed since last update.

GitLabでSSHを22番ポート以外で運用している時のリポジトリパスの指定方法

Posted at

GitLabのリポジトリをSSH経由でcloneする際などに指定するパスの書き方。

SSHのデフォルトポート22番で運用している場合は

git@gitlab.example.com:<Guroup名>/<Project(リポジトリ)名>.git

と指定する。
(ユーザ名、ドメイン名は適宜それぞれの環境にあわせて読み替えてください)

一方、現場によっては、セキュリティ施策の都合で
SSHをデフォルト以外のポートで運用していることもあるかと思う。
その場合は以下のように指定する。

ssh://git@gitlab.example.com:<ポート番号>/<Guroup名>/<Project(リポジトリ)名>.git

先頭に ssh:// をつけるのと、
ポート番号の後ろの区切りがコロン : ではなく、
スラッシュ / になるところがポイント。

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?