Skip to main content

GitLab CLI: Notes

Install GitLab CLI - glab - using winget

Install GitLab CLI - glab - using winget
PS F:\Projects\gitlab> glab auth login
? What GitLab instance do you want to log into? GitLab.com
- Logging into gitlab.com

Tip: you can generate a Personal Access Token here https://gitlab.com/profile/personal_access_tokens
The minimum required scopes are 'api' and 'write_repository'.
? Choose default git protocol HTTPS
? Authenticate Git with your GitLab credentials? Yes
- glab config set -h gitlab.com git_protocol https
✓ Configured git protocol
- glab config set -h gitlab.com api_protocol https
✓ Configured API protocol
✓ Logged in as tuyendq
PS F:\Projects\gitlab>

PS F:\Projects\gitlab> glab repo create lthwgitlab
? Create a local project directory for Tuyen Dang / lthwgitlab? Yes
Initialized empty Git repository in F:/Projects/gitlab/lthwgitlab/.git/
✓ Initialized repository in './lthwgitlab/'
PS F:\Projects\gitlab> cd .\lthwgitlab\
PS F:\Projects\gitlab\lthwgitlab> gci -Force


    Directory: F:\Projects\gitlab\lthwgitlab


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d--h--          8/4/2021   2:02 PM                .git


PS F:\Projects\gitlab\lthwgitlab>

Popular posts from this blog

Powershell: Install IIS

Run Powershell as Administrator, then run the command below to install IIS. Install-WindowsFeature Web-WebServer Check after installing Get-WindowsFeature *Web*

[PowerShell]: Powershell script uploading backup databases to ftp server

Author:  Enrique Puig Nouselles http://gallery.technet.microsoft.com/scriptcenter/80647f66-139c-40a4-bb7a-04a2d73d423c Nhu cầu - Học sử dụng Powershell và áp dụng vào thực tế - Server chạy MS SQL được backup mỗi ngày và lưu các file backup ở folder mặc định "C:/Program Files/Microsoft SQL Server/MSSQL11.MSSQLSERVER/MSSQL/Backup" - Upload các file database backup về một ftp server khác để lưu "offsite" # Begin script # Thanks to: Enrique Puig Nouselles http://gallery.technet.microsoft.com/scriptcenter/80647f66-139c-40a4-bb7a-04a2d73d423c # Khai báo folder chứa các file backup database, dưới đây là folder backup mặc định của MS SQL 2012 $Dir="C:/Program Files/Microsoft SQL Server/MSSQL11.MSSQLSERVER/MSSQL/Backup"   # ftp server $ftp = "ftp://IPAddres/subfolder/subsubfolder" $user = "usernamehere" $pass = "passwordhere" # DO NOT use $(Get-Date), use $d variable instead, otherwise SQL Agent gets error "The...