Can`t push changes to my repo.

Post Reply
User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Can`t push changes to my repo.

by Andrey01 » Post

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.

User avatar
shivajiva
Member
Posts: 32
Joined: Fri Nov 27, 2015 09:41
In-game: shivajiva

Re: Can`t push changes to my repo.

by shivajiva » Post

Better reset your password https://www.github.com/password_reset to regain access

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Can`t push changes to my repo.

by Linuxdirk » Post

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.

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Can`t push changes to my repo.

by Andrey01 » Post

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?

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Can`t push changes to my repo.

by Andrey01 » Post

shivajiva wrote:Better reset your password https://www.github.com/password_reset to regain access
Ok, i'll try!

Thanks for replies.

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Can`t push changes to my repo.

by Andrey01 » Post

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. :(((((

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: Can`t push changes to my repo.

by TumeniNodes » Post

A Wonderful World

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Can`t push changes to my repo.

by Linuxdirk » Post

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?

User avatar
Pyrollo
Developer
Posts: 385
Joined: Mon Jan 08, 2018 15:14
GitHub: pyrollo
In-game: Naj
Location: Paris

Re: Can`t push changes to my repo.

by Pyrollo » Post

Are you under Windows ? Does git asks your for a password when issuing "git push" ?
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Can`t push changes to my repo.

by Andrey01 » Post

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.

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Can`t push changes to my repo.

by Linuxdirk » Post

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.

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Can`t push changes to my repo.

by Andrey01 » Post

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?

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Can`t push changes to my repo.

by Linuxdirk » Post

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).

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Can`t push changes to my repo.

by Andrey01 » Post

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 :/

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Can`t push changes to my repo.

by Linuxdirk » Post

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.

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Can`t push changes to my repo.

by Andrey01 » Post

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.

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Can`t push changes to my repo.

by Linuxdirk » Post

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.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 6 guests