Authentication failed publishing a repository from Github for Windows
Asked Answered
A

3

8

I am trying out Github for Windows and I am getting the following error when I try to publish a newly created repository.

Authentication failed

Your credentials may be out of date. Please log out of the application and then log back in before retrying the operation.

Needless to say I've logged out and back in multiple times without success. I've also uninstalled and installed the latest version to no avail.

The repository is a new one I created within the application and contains only the .gitattributes, .git and README files.

I am a complete newbie to Github so it's quite possible I've messed something up during the setup process.

Aquiver answered 22/7, 2012 at 17:1 Comment(0)
A
10

It turns out that the problem was Github for Windows was having a problem with the password it had stored. Github support's instructions were as follows:

  1. Log out of Github for Windows.
  2. Change my password on github.com
  3. Log back into Github for Windows.

I was then able to publish my changes.

Aquiver answered 26/7, 2012 at 17:11 Comment(2)
Glad you got it sorted out. Github is the bee's knees.Microreader
Seems, that there are problems with at least one extended ASCII character.Phelps
T
11

I was able to solve this by:

  1. Press Settings - Open in GitShell.
  2. git status
  3. git push (or pull)
  4. introduce credentials (here is the most important step, somehow git client messed up or forgot your credentials).

After giving correct credentials you can exit from git shell and use git client again.

Trinitrotoluene answered 7/7, 2014 at 17:7 Comment(1)
Ideally, GH4Win would "just work" with 3rd party repos, but this is an acceptable solution for my client. ThanksBabe
A
10

It turns out that the problem was Github for Windows was having a problem with the password it had stored. Github support's instructions were as follows:

  1. Log out of Github for Windows.
  2. Change my password on github.com
  3. Log back into Github for Windows.

I was then able to publish my changes.

Aquiver answered 26/7, 2012 at 17:11 Comment(2)
Glad you got it sorted out. Github is the bee's knees.Microreader
Seems, that there are problems with at least one extended ASCII character.Phelps
M
0

Did you setup your ssh keys?

https://help.github.com/articles/generating-ssh-keys#platform-windows

Microreader answered 22/7, 2012 at 17:15 Comment(7)
I have followed the steps in that link but I am still having the same problem. Do I somehow need to add the SSH keys to the Github application? I did notice that when I was using the Git Shell, the directory I was in was different to the directory that I've chosen as the default storage directory in the Github application. Is that ok or will the application be looking for the keys in the wrong place?Aquiver
Github doesn't use password authentication, it uses ssh keys. Which means you have a private key on your machine, and you put the public one into github. So your computer and github should be able to talk without the app. (The app doesn't take any keys, it relies on your computer already being able to talk to the server). So let's exclude the app from the equation for now. Open git bash and what does ssh -T [email protected] output?Microreader
Oh. and your ssh key should be in ~/.ssh. You should only need one per computer. And it should be outside of your project directory because it shouldn't be put in git history. If you give your private key to someone else, they'll be able to access your repos. So keep that private.Microreader
Thanks for your continued help. Here is the output: ssh -T [email protected] Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.Aquiver
Just to confirm, my key is in ~/.ssh as your original link required.Aquiver
Crap. I think you're going to need someone smarter than me. I'm on OS X and I only use a git GUI for merge conflicts. Any Windows users out there? I guess one last thing to try from git bash: cd existing_git_repo git remote add origin [email protected]:[user]/[reponame].git git push -u origin master If that breaks, it might give you some more clues, but it sounds like it will probably publish. If that publishes okay, then I probably won't be any help to you. Sorry :c. (That's 3 commands. Can't put linebreaks in comments)Microreader
Thanks for your help @yellottyellott. It turns out it was a problem with the password that Github for Windows had stored. See my answer for how I resolved it.Aquiver

© 2022 - 2024 — McMap. All rights reserved.