Page 1 of 1

Can`t push changes to my repo.

PostPosted: Sun Sep 01, 2019 16:58
by Andrey01
It says this error:
Code: Select all
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/Andrey2470T/luxury_decor'


It happened after I changed a password to new in my github profile.

Re: Can`t push changes to my repo.

PostPosted: Fri Sep 06, 2019 12:42
by shivajiva
Better reset your password https://www.github.com/password_reset to regain access

Re: Can`t push changes to my repo.

PostPosted: Fri Sep 06, 2019 12:50
by Linuxdirk
Andrey01 wrote:It happened after I changed a password to new in my github profile.

What's you local Git client? If you use the official command line client try to re-set your user name and password either locally or globally (if you use your account for different repositories and set it up globally before).

Code: Select all
cd my_awesome_repository
git config --local user.name 'myCoolUserName'
git config --local user.password 'MySuperS3curePassw0rd'

Or --global.

Re: Can`t push changes to my repo.

PostPosted: Sun Sep 08, 2019 07:22
by Andrey01
Linuxdirk wrote:
Andrey01 wrote:It happened after I changed a password to new in my github profile.

What's you local Git client? If you use the official command line client try to re-set your user name and password either locally or globally (if you use your account for different repositories and set it up globally before).

Code: Select all
cd my_awesome_repository
git config --local user.name 'myCoolUserName'
git config --local user.password 'MySuperS3curePassw0rd'

Or --global.

My config file doesn't have "user.password" setting . And do I need it to be set when pushing/pulling?

Re: Can`t push changes to my repo.

PostPosted: Sun Sep 08, 2019 07:24
by Andrey01
shivajiva wrote:Better reset your password https://www.github.com/password_reset to regain access

Ok, i'll try!

Thanks for replies.

Re: Can`t push changes to my repo.

PostPosted: Sun Sep 08, 2019 20:19
by Andrey01
Andrey01 wrote:
shivajiva wrote:Better reset your password https://www.github.com/password_reset to regain access

Ok, i'll try!

Thanks for replies.

It doesn`t change anything. :(((((

Re: Can`t push changes to my repo.

PostPosted: Sun Sep 08, 2019 20:33
by TumeniNodes

Re: Can`t push changes to my repo.

PostPosted: Mon Sep 09, 2019 05:13
by Linuxdirk
Andrey01 wrote:My config file doesn't have "user.password" setting . And do I need it to be set when pushing/pulling?

Do you mind answering my questions and try what I suggested?

Re: Can`t push changes to my repo.

PostPosted: Mon Sep 09, 2019 07:20
by Pyrollo
Are you under Windows ? Does git asks your for a password when issuing "git push" ?

Re: Can`t push changes to my repo.

PostPosted: Mon Sep 09, 2019 09:33
by Andrey01
Pyrollo wrote:Are you under Windows ? Does git asks your for a password when issuing "git push" ?

No, it doesn't ask for it. It just waits for something for a while (2-3 seconds) and then says: "fatal: Invalid username or password". Obviously, I can not in time to enter my password within this time.

And, I use linux, openSUSE.

Linuxdirk wrote:
Andrey01 wrote:My config file doesn't have "user.password" setting . And do I need it to be set when pushing/pulling?

Do you mind answering my questions and try what I suggested?

I already said the re-setting doesn't change anything.

Re: Can`t push changes to my repo.

PostPosted: Mon Sep 09, 2019 09:49
by Linuxdirk
Andrey01 wrote:and then says: "fatal: Invalid username or password". Obviously, I can not in time to enter my password within this time.

This is because your locally stored credentials do not match your repository's credentials.

Andrey01 wrote:I already said the re-setting doesn't change anything.

Just do what I said.

Re: Can`t push changes to my repo.

PostPosted: Mon Sep 09, 2019 10:59
by Andrey01
Linuxdirk wrote:
Andrey01 wrote:and then says: "fatal: Invalid username or password". Obviously, I can not in time to enter my password within this time.

This is because your locally stored credentials do not match your repository's credentials.

Andrey01 wrote:I already said the re-setting doesn't change anything.

Just do what I said.

I did set username and password globally because I want to use my account for all repos as you told me. And I say it doesn't fix this issue.

Also, I don't know what "your locally stored credentials don't match your repository's credentials" implies. What are local credentials?

Re: Can`t push changes to my repo.

PostPosted: Mon Sep 09, 2019 13:02
by Linuxdirk
Andrey01 wrote:Also, I don't know what "your locally stored credentials don't match your repository's credentials" implies. What are local credentials?

Well, you locally stored credentials are your locally stored credentials. Either username/password or certificate, or keyfile, or anything else. And whatever it is, it does not match the credentials for your repository. What did you use before? Password? Certificate? Make sure your credentials match your repository's credentials (if you use GitHub your repository credentials are your GitHub user name and password).

Re: Can`t push changes to my repo.

PostPosted: Tue Sep 10, 2019 18:05
by Andrey01
Linuxdirk wrote:
Andrey01 wrote:Also, I don't know what "your locally stored credentials don't match your repository's credentials" implies. What are local credentials?

Well, you locally stored credentials are your locally stored credentials. Either username/password or certificate, or keyfile, or anything else. And whatever it is, it does not match the credentials for your repository. What did you use before? Password? Certificate? Make sure your credentials match your repository's credentials (if you use GitHub your repository credentials are your GitHub user name and password).

Ah, you mean they don't match to ones' my remote repisitory. My local credentials exactly match to repository's ones. What very strange is what I actually did not save them before the changing my password in both ~/.gitconfig and .git/config files and I could push changes without any hinders. Since even their enabling don't perfectly help.

I also attempted to add a token to access ssh link. But it fails and says I probably don't have rights to my repo access :/

Re: Can`t push changes to my repo.

PostPosted: Tue Sep 10, 2019 18:48
by Linuxdirk
Andrey01 wrote:My local credentials exactly match to repository's ones.

Obviously not. Otherwise you wouldn’t get a message about username or password being wrong. Git isn’t lying to you, you know? :)

Andrey01 wrote:What very strange is what I actually did not save them before the changing my password in both ~/.gitconfig and .git/config files and I could push changes without any hinders.

So you used SSH before. Can you log in to your GitHub account? Maybe go here and upload your current public keys.

Re: Can`t push changes to my repo.

PostPosted: Tue Sep 10, 2019 19:32
by Andrey01
Linuxdirk wrote:
Andrey01 wrote:My local credentials exactly match to repository's ones.

Obviously not. Otherwise you wouldn’t get a message about username or password being wrong. Git isn’t lying to you, you know? :)

I verified my local credentials (username and password) exactly identical with the remote repo's ones and I can not mistake in it anyhow.

LinuxDirk wrote:
Andrey01 wrote:What very strange is what I actually did not save them before the changing my password in both ~/.gitconfig and .git/config files and I could push changes without any hinders.

So you used SSH before. Can you log in to your GitHub account? Maybe go here and upload your current public keys.

Of course, I can log in. And I did use HTTPS, not SSH, why do you say? I say I attempted to push changes used SSH before, but it failed for an unknown reason.

Re: Can`t push changes to my repo.

PostPosted: Wed Sep 11, 2019 04:52
by Linuxdirk
Andrey01 wrote:I verified my local credentials (username and password) exactly identical with the remote repo's ones and I can not mistake in it anyhow.

Maybe pushing to the wrong repo then? As said: Git isn't lying. If it says that your credentials are wrong, then your credentials are wrong. There. Are. No. Exceptions.