3

I started getting the following error a week ago when pushing with git-cola...I found something about a similar problem happening a lot a couple years ago but it didn't help at all.

"git push" returned exit status 128

Have you rebased/pulled lately?

Already up-to-date.

Pushing to https://github.com/slacktracer/lokapala.git
error: cannot run None: No such file or directory
fatal: could not read Username for 'https://github.com': No such device or address

When I push with the terminal it works just fine, so perhaps it is mostly a question about git-cola. Anyway, just wondering if anyone can help. I'm lost right now...

Jason C
  • 38,729
  • 14
  • 126
  • 182
slacktracer
  • 6,262
  • 6
  • 28
  • 33
  • "I found something about a similar problem happening a lot a couple years ago but it didn't help at all." Are you referring to another question on Stack Overflow? **Which question?** –  May 31 '14 at 03:22
  • @Cupcake I wasn't referring to any specific stackoverflow question. But the question linked by VonC mentions it too: http://stackoverflow.com/questions/20871549/error-when-push-commits-with-github-fatal-could-not-read-username – slacktracer Jun 02 '14 at 19:43

2 Answers2

1
cannot run None: No such file or directory

That would mean your editor used for the commit message isn't properly set.
Check the value of git config core.editor

fatal: could not read Username for 'https://github.com': No such device or address

Check, as in this answer, if you are not using a msysgit 1.8.5 (on Windows): more recent versions don't have this bug.

See if your config does have a user.name and user.email declared.

If https access fails consistently, try switching to ssh.

But for https, you also can create an OAut token and

git config remote.origin.url https://{token}@github.com/username/project.git
git config remote.origin.url https://{token}@github.com/slacktracer/lokapala.git
# or
git remote set-url origin https://{token}@github.com/slacktracer/lokapala.git

The OP slacktracer confirms in the comments that the issue seems limited on git-cola on lunbuntu.

  • Using git-gui could be a workaround.
  • Typing git push from the command-line allows to switch right back in any GUI.

The issue 179 can help, as well as launching git cola with:

GIT_COLA_TRACE=1 git cola
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hey, thanks. I'm on lubuntu, so I can't have the msysgit problem, right? I can still push from the terminal and, just installed for testing, git-gui. It seems git-cola stopped asking for username and password... (pushing to github, I mean) – slacktracer Jun 02 '14 at 19:45
  • @slacktracer do you mean you can push to GitHub now? It is possible git-cola has now cached your credentials. – VonC Jun 02 '14 at 19:57
  • No! I still can't push with git-cola. It doesn't work. Give me the aforementioned error. Ad it doesn't prompt me to user and password. git-gui, I just installed it, does. It does work. I can push with it. As I can push from the terminal. – slacktracer Jun 02 '14 at 20:00
  • My usual workflow was using git-cola to push to github. If can't make it work as it did, I will start using git-gui. I'm sure it could be much worse... =) – slacktracer Jun 02 '14 at 20:01
  • @slacktracer or you could type git push, from the command-line, before switching back to git-cola or git-gui. – VonC Jun 02 '14 at 20:02
  • Sure! I'm just not used to do it. And fear it would get a bit more "complicated" with many branches and the sort. Perhaps I'm completely wrong though. Anyway, I really liked git-cola. It was the perfect tool for me. Easy to use and made clear to me what was going on and what I was doing. =) Thank you. – slacktracer Jun 02 '14 at 20:09
  • @slacktracer try a `GIT_COLA_TRACE=1 git cola` and see if it is more verbose. You can read more at https://github.com/git-cola/git-cola/issues/179. – VonC Jun 02 '14 at 20:16
  • Yes! I did try earlier to install from source but had a little problem. Reading your link I cleared my head and made my install work. And now I'm able to push from latest git-cola. Thank you for this last "push" in the right direction. ;) And sorry for the pun. – slacktracer Jun 03 '14 at 21:28
  • @slacktracer great! I have included said "last push" in the answer for more visibility. – VonC Jun 03 '14 at 22:01
0

I had the same problem and just purged config files, for me just reinstalling worked. '-'

 # apt-get purge git-cola 

EDIT: In fact, installing git-gui really solved it for me.

Anderson Madeira
  • 420
  • 9
  • 29