GitLab Shell 기능 목록

발견

사용자가 SSH를 통해 인스턴스에서 자신을 식별할 수 있도록 합니다. 이 명령은 사용자가 인스턴스에 SSH 접근 권한이 있는지 빠르게 확인하는 데 도움을 줍니다:

ssh git@<hostname>

PTY allocation request failed on channel 0
Welcome to GitLab, @username!
Connection to staging.gitlab.com closed.

권한이 거부되면 다음과 같이 반환됩니다:

ssh git@<hostname>
git@<hostname>: Permission denied (publickey).

Git 작업

GitLab Shell은 SSH를 통해 git-upload-pack, git-receive-packgit-upload-archive SSH 명령을 처리하여 Git 작업을 지원합니다. 미리 정의된 Git 명령 집합으로 명령을 제한합니다:

  • git archive
  • git clone
  • git pull
  • git push

새로운 2FA 복구 코드 생성

사용자가 새로운 2FA 복구 코드 생성을 할 수 있게 합니다:

$ ssh git@<hostname> 2fa_recovery_codes

Are you sure you want to generate new two-factor recovery codes?
Any existing recovery codes you saved will be invalidated. (yes/no)
yes

Your two-factor authentication recovery codes are:
...

2FA OTP 검증

사용자가 2FA 일회용 비밀번호(OTP)을 검증할 수 있게 합니다:

$ ssh git@<hostname> 2fa_verify

OTP: 347419

OTP validation failed.

LFS 인증

사용자가 LFS 인증을 위한 자격 증명을 생성할 수 있게 합니다:

$ ssh git@<hostname> git-lfs-authenticate <project-path> <upload/download>

{"header":{"Authorization":"Basic ..."},"href":"https://gitlab.com/user/project.git/info/lfs","expires_in":7200}

개인 액세스 토큰

사용자가 SSH와 함께 개인 액세스 토큰을 사용할 수 있게 합니다:

$ ssh git@<hostname> personal_access_token <name> <scope1[,scope2,...]> [ttl_days]

Token:   glpat-...
Scopes:  api
Expires: 2022-02-05