Updated as of 4/28/2020 4:00 PM (Philippine Standard Time) to include scopes for private repos.
You need to create an access token from your GitLab account if you not yet set up a password or if protected by 2FA.
- Login to your GL instance account, as usual.
- Click your profile picture and select Settings.
- On User Settings sidebar, click Access tokens.
- At the Add a personal access token section, give a unique name and, optionally expiration date.
- Select
api only as scope for your new access token. If you're working in private projects, also include read_repository and write_repository scopes.

- Hit Create personal access token and let GitLab generate it for you.
- Copy the access token. You'll be not able to see it again for security reasons. Instance Admins can help you create API keys, but they'll also see this once.

Treat your access tokens like your passwords! Keep your scopes for next access tokens low and only share it with person/people you trust. Because I shared the example token here, any attempts to use it were now triggering errors because I revoked it before I update my answers.
Then, try logging in when using git push.
## Init the local repo
mkdir test-to-connect
cd test-to-connect
git init
## Add your user name and email to Git.
git config --global user.name "Your name"
git config --global user.email "[email protected]"
## Create a new private repo after pushing.
git remote set origin https://your-gl-instance-host.dev/your-username/your-new-project-slug
## Commit
git commit -m "Initial commit"
## Push to GitLab
git push origin
## Username for 'https://your-gl-instance-host.dev': your-username
## Password for 'https://[email protected]' [REDACTED]