Skip to content
  • Taylan Develioglu's avatar
    Add support obtaining personal access tokens via SSH · b8d66d79
    Taylan Develioglu authored
    Implements the feature requested in gitlab#19672
    
    This requires the internal api counterpart in gitlab!36302 to
    be merged first.
    
    It can be used as follows:
    ```
    censored@censored-VirtualBox:~/git/gitlab$ ssh git@gitlab-2004 personal_access_token
    remote:
    remote: ========================================================================
    remote:
    remote: Usage: personal_access_token <name> <scope1[,scope2,...]> [ttl_days]
    remote:
    remote: ========================================================================
    remote:
    
    censored@censored-VirtualBox:~/git/gitlab$ ssh git@gitlab-2004 personal_access_token newtoken read_api,read_repository 30
    Token:   aAY1G3YPeemECgUvxuXY
    Scopes:  read_api,read_repository
    Expires: 2020-08-07
    ```
    b8d66d79