I am new to Git (just started 2 days ago). I'm attempting to create a project to practice the basic commands I've learned from here.
Where I am, so far:
README.md
into the project.develop
.[success] In my local folder C:\gitprojects
, set global user.name
and user.email
with the commands:
git config --global user.name <my user name>
git config --global user.email <my-email>
[success] Clone the project into my local folder C:\gitprojects
with the command git clone https://[email protected]/flamedenise19/speedtyping.git
git checkout -b "develop"
.test.txt
on local root folder for test pushing.git commit -m "adds test.txt"
git push origin develop
And now, I'm stuck with the push
part. After entering git push origin develop
, a new window pops up, asking for my credentials (see screenshot below):
So I did enter my credentials (the very same username and password I use when logging in to gitlab.com), but after that, I got this error (also see screenshot below):
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/flamedenise19/speedtyping.git/'
QUESTIONS:
Please help.
NOTE: I have seen THIS ONE, and the answers are mentioning Tortoise. Is it always required to use tortoise in order to use Git?
SOME BACKGROUND INFO:
Two-Factor Authentication is disabled for my account (see screenshot below):
There are three main approaches you can take: Using a personal authentication token or password. Using an SSH key. Using your GitHub password with 2-factor authentication.
Or finding it via the Control Panel -> Manage Windows Credentials. Go to Windows Credentials -> Generic Credentials. Here your credential should be listed if everything is working correctly. Git should add it by default the first time you log in to a new repository.
Git Credential Manager creates and stores credentials to access Git repositories on a host of platforms. We hold in the highest regard the need to keep your credentials and access secure. That's why we always keep your credentials stored using industry standard encryption and storage APIs.
If it is on windows, go to Credential Manager, Windows Credentials and Delete the entries under Generic Credentials.
Try connecting again. This time, it should prompt you for the correct username and password.
These are my ideas:
Git Credential Manager for Windows
When you've fixed the push problem you will also be able to clone it when it is private or internal.
After doing some digging of my own thanks to this problem I found out that it is more than likely coming from the credential manager. I had no ssh keys since it was a fresh Gitlab account and it was not working with my username and password. The same setup however, was working on GitHub. After uninstalling git and reinstalling without the credential manager it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With