When I tried to push the code into remote repo from local (macbook), I faced the same issue after PASSWORD reset on GHE website.
$ git push -u origin coffee_shop_autorization
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/ravinderreddy-p/FSND.git/'
Then I followed below simple steps to fix this issue:
I cloned another repository from GHE to local in different folder:
git clone https://github.com/ravinderreddy-p/bookshelf.git
- I switched to this folder by 'cd bookshelf'
I tried to push the same without making any changes as below:
git push
- It prompted for Username for 'https://github.com':<Provide your GHE user name> then press enter.
- It prompted as Password for 'https://ravinderreddy-p@github.com': <provide
updated password on GHE> then press enter
- You will see this message as "Everything up-to-date"
All Done.
Now go to your previous local repo where you tried to push the code into remote and execute your previous command
git push -u origin coffee_shop_autorization
It will push the code into remote repo and you can see similar as below (with your repo and branch details):
Enumerating objects: 35, done.
Counting objects: 100% (27/27), done.
Delta compression using up to 4 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (15/15), 2.47 KiB | 843.00 KiB/s, done.
Total 15 (delta 8), reused 0 (delta 0)
remote: Resolving deltas: 100% (8/8), completed with 5 local objects.
remote:
remote: Create a pull request for 'coffee_shop_autorization' on GitHub by visiting:
remote: https://github.com/ravinderreddy-p/FSND/pull/new/coffee_shop_autorization
remote:
To https://github.com/ravinderreddy-p/FSND.git
- [new branch] coffee_shop_autorization -> coffee_shop_autorization
Branch 'coffee_shop_autorization' set up to track remote branch 'coffee_shop_autorization' from 'origin'.