Reputation: 1005
After running the following commands:
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/<UserName>/<repo-name>.git/
git push -u origin master
Username for 'https://github.com': <User-Name>
Password for 'https://<User-Name>@github.com':
after entering the correct credentials, im getting the following error:
remote: Anonymous access to <UserName>/<repo-name>.git denied.
fatal: Authentication failed for 'https://github.com/<UserName>/<repo-
name>.git/'
any ideas why this happens and how to deal with it?
Upvotes: 1
Views: 2754
Reputation: 1323115
Check if you don't have a credential helper which could overwrite your login/password:
git config credential.helper
And try the same remote URL withou a final '/'
git remote set-url origin https://github.com/<UserName>/<repo-name>.git
Upvotes: 1