Unlike this post, I am on macOS.
I have the password configured in GitLab. I also have an SSL key created after the project was made on GitLab.
When I use an existing folder for a new project and follow the steps below, I am prompted to enter my GitLab username and password.
Existing folder
cd existing_folder
git init
git remote add origin https://gitlab.com/sobopla/Geronimod.git
git add .
git commit -m "Initial commit"
git push -u origin master
After the password is entered I get the following error.
remote: HTTP Basic: Access denied fatal: Authentication failed for 'https://gitlab.com/myname/myproject'
git remote add origin [email protected]:sobopla/Geronimod.git
. This should if you have your SSH keys set up properly. – Risk