New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Cola hangs during push process #377

Closed
Vdragon opened this Issue Nov 24, 2014 · 43 comments

Comments

Projects
None yet
@Vdragon
Contributor

Vdragon commented Nov 24, 2014

_003
The push is successful but Git Cola hangs in this state. This issue is currently not always reproducible.

Reporter's environment

OS

Ubuntu 14.04 x86 32bit

Desktop environment

KDE

Python

2.7.5

Git

1.9.1

Locale

zh_TW.UTF-8

remote type

HTTPS

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Nov 24, 2014

Member

Is there any output in the shell? At this point we're basically just blocking on git push.

Member

davvid commented Nov 24, 2014

Is there any output in the shell? At this point we're basically just blocking on git push.

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Nov 26, 2014

Contributor

Currently not noticing any usable output from the shell (including console widget)

Contributor

Vdragon commented Nov 26, 2014

Currently not noticing any usable output from the shell (including console widget)

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Nov 27, 2014

Contributor

Process tree from htop
_011

Contributor

Vdragon commented Nov 27, 2014

Process tree from htop
_011

@lukebakken

This comment has been minimized.

Show comment
Hide comment
@lukebakken

lukebakken Dec 5, 2014

Enable tracing as described in issue #177. Once I did that, I no longer had the "hanging push" issue described in this GH issue.

How I ran it:

 GIT_COLA_TRACE=full /usr/bin/git-cola 2>&1 | tee git-cola.log

Without tracing, push hangs every time. I suspect a race condition waiting for output from git push. Please let me know how I can help debug this. Thanks!

lukebakken commented Dec 5, 2014

Enable tracing as described in issue #177. Once I did that, I no longer had the "hanging push" issue described in this GH issue.

How I ran it:

 GIT_COLA_TRACE=full /usr/bin/git-cola 2>&1 | tee git-cola.log

Without tracing, push hangs every time. I suspect a race condition waiting for output from git push. Please let me know how I can help debug this. Thanks!

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Dec 25, 2014

Contributor

git bisect tells me that commit 152bfeb is the first bad commit, but since I'm not sure the bug is 100% reproducible just consider it as a guess.

UPDATE: ignore this since the second attempt of git bisect leads to another commit 4124eaa

Contributor

Vdragon commented Dec 25, 2014

git bisect tells me that commit 152bfeb is the first bad commit, but since I'm not sure the bug is 100% reproducible just consider it as a guess.

UPDATE: ignore this since the second attempt of git bisect leads to another commit 4124eaa

@living180

This comment has been minimized.

Show comment
Hide comment
@living180

living180 Dec 26, 2014

Contributor

That second commit certainly has nothing to do with this issue, as it only affected a test.

I suspect a more reliable way to reproduce the problem is necessary before bisection will be successful.

Contributor

living180 commented Dec 26, 2014

That second commit certainly has nothing to do with this issue, as it only affected a test.

I suspect a more reliable way to reproduce the problem is necessary before bisection will be successful.

@pamstr

This comment has been minimized.

Show comment
Hide comment
@pamstr

pamstr Jan 11, 2015

Hello, I have this issue every time I'm pushing sth to remote repository... After checking that everything is on github (manually, on page), I just hit alt+f4 to close "push-updating window", then again to close "push-options window". After that I have to wait few seconds and git cola works again until I want to push something again - it ask for credentials and hangs again on updating window.

I've tried to start git-cola from terminal, but I got:
"Sorry, you do not seem to have PyQt4 installed.
Please install it before using git-cola.
e.g.: sudo apt-get install python-qt4"

but I have it (in fact I'm using git-cola GUI...):
$ dpkg -l|grep python-qt4
ii python-qt4 4.11.2+dfsg-1 i386 Python bindings for Qt4

I'm using Debian Testing (with GNOME),
git-cola is in 2.0.6-1 version (from repository).

Because of the pyQt4 problem I don't know how can I get useful informations for you.

pamstr commented Jan 11, 2015

Hello, I have this issue every time I'm pushing sth to remote repository... After checking that everything is on github (manually, on page), I just hit alt+f4 to close "push-updating window", then again to close "push-options window". After that I have to wait few seconds and git cola works again until I want to push something again - it ask for credentials and hangs again on updating window.

I've tried to start git-cola from terminal, but I got:
"Sorry, you do not seem to have PyQt4 installed.
Please install it before using git-cola.
e.g.: sudo apt-get install python-qt4"

but I have it (in fact I'm using git-cola GUI...):
$ dpkg -l|grep python-qt4
ii python-qt4 4.11.2+dfsg-1 i386 Python bindings for Qt4

I'm using Debian Testing (with GNOME),
git-cola is in 2.0.6-1 version (from repository).

Because of the pyQt4 problem I don't know how can I get useful informations for you.

@JiCiT

This comment has been minimized.

Show comment
Hide comment
@JiCiT

JiCiT Jan 13, 2015

I'm having this same issue. Running from a terminal, I get prompted for for SSH credentials in the terminal window. Running from GUI (LXDE), I get the hang. I have both SSH_ASKPASS and GIT_ASKPASS environment variables set to lxqt_openssh-askpass which seems to work fine when I run that by itself.

JiCiT commented Jan 13, 2015

I'm having this same issue. Running from a terminal, I get prompted for for SSH credentials in the terminal window. Running from GUI (LXDE), I get the hang. I have both SSH_ASKPASS and GIT_ASKPASS environment variables set to lxqt_openssh-askpass which seems to work fine when I run that by itself.

@JiCiT

This comment has been minimized.

Show comment
Hide comment
@JiCiT

JiCiT Jan 13, 2015

FWIW, aliasing git like so: "alias git='eval $( /usr/bin/keychain --eval --agents ssh --quiet ~/.ssh/*_rsa ) && git'" seems to have solved the issue for me.

JiCiT commented Jan 13, 2015

FWIW, aliasing git like so: "alias git='eval $( /usr/bin/keychain --eval --agents ssh --quiet ~/.ssh/*_rsa ) && git'" seems to have solved the issue for me.

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Jan 13, 2015

Contributor

@JiCiT
For the command-line prompting issue please checkout #262
This issue is for users that successfully pushes, but hangs with unknown reason.

Contributor

Vdragon commented Jan 13, 2015

@JiCiT
For the command-line prompting issue please checkout #262
This issue is for users that successfully pushes, but hangs with unknown reason.

@JiCiT

This comment has been minimized.

Show comment
Hide comment
@JiCiT

JiCiT Jan 14, 2015

Looks like probably the same issues?

JiCiT commented Jan 14, 2015

Looks like probably the same issues?

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Apr 25, 2015

Contributor

Issue still reproducible on commit 4d2a455, I suspect it's always reproducible on my Laptop & 3G connection, still investigating...

Contributor

Vdragon commented Apr 25, 2015

Issue still reproducible on commit 4d2a455, I suspect it's always reproducible on my Laptop & 3G connection, still investigating...

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Apr 25, 2015

Member

Yeah, it would be nice if the askpass stuff had a way to force its usage.

Another idea for folks hitting this issue ~ do you really like typing your password each time? Modern Git has a built-in feature called the "credentials cache" that you can use to avoid needing to type your password. It doesn't fix this issue but it does give you an easy way to to avoid it.

C.f. https://git-scm.herokuapp.com/docs/git-credential-cache

I'll leave this issue open for another month or two in case anyone has any other ideas, but it probably is the same as #262

Member

davvid commented Apr 25, 2015

Yeah, it would be nice if the askpass stuff had a way to force its usage.

Another idea for folks hitting this issue ~ do you really like typing your password each time? Modern Git has a built-in feature called the "credentials cache" that you can use to avoid needing to type your password. It doesn't fix this issue but it does give you an easy way to to avoid it.

C.f. https://git-scm.herokuapp.com/docs/git-credential-cache

I'll leave this issue open for another month or two in case anyone has any other ideas, but it probably is the same as #262

@lukebakken

This comment has been minimized.

Show comment
Hide comment
@lukebakken

lukebakken Apr 25, 2015

FWIW, I am running keychain/ssh-agent so no passphrase is necessary. git cola hangs as long as tracing is not enabled.

lukebakken commented Apr 25, 2015

FWIW, I am running keychain/ssh-agent so no passphrase is necessary. git cola hangs as long as tracing is not enabled.

@davvid davvid closed this in eac0926 Apr 26, 2015

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Apr 26, 2015

Member

I think I found a solution to ensure that the askpass helpers are used. Please test eac0926 and let me know if it makes things better. Thanks for the help everyone.

Member

davvid commented Apr 26, 2015

I think I found a solution to ensure that the askpass helpers are used. Please test eac0926 and let me know if it makes things better. Thanks for the help everyone.

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Apr 26, 2015

Contributor

I still can reproduce this issue after upgrade to the latest version, I'll reopen after verify.

Contributor

Vdragon commented Apr 26, 2015

I still can reproduce this issue after upgrade to the latest version, I'll reopen after verify.

@mase-tech

This comment has been minimized.

Show comment
Hide comment
@mase-tech

mase-tech Jul 1, 2015

Hi peps,

I got this problem.... I cannot push...

git push" returned exit status 128

Have you rebased/pulled lately?

Already up-to-date.

Versende nach https://github.com/mase-tech/FreeCAD-LEGO.git
/home/creep/git-cola/git-cola/share/git-cola/bin/ssh-askpass: 3: exec: wish: not found
error: unable to read askpass response from '/home/creep/git-cola/git-cola/share/git-cola/bin/ssh-askpass'
fatal: could not read Username for 'https://github.com': No such device or address

mase-tech commented Jul 1, 2015

Hi peps,

I got this problem.... I cannot push...

git push" returned exit status 128

Have you rebased/pulled lately?

Already up-to-date.

Versende nach https://github.com/mase-tech/FreeCAD-LEGO.git
/home/creep/git-cola/git-cola/share/git-cola/bin/ssh-askpass: 3: exec: wish: not found
error: unable to read askpass response from '/home/creep/git-cola/git-cola/share/git-cola/bin/ssh-askpass'
fatal: could not read Username for 'https://github.com': No such device or address

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Jul 1, 2015

Member

@mase-tech your problem is unrelated. I left a note in the issue you submitted (you need to sudo apt-get install wish)

Member

davvid commented Jul 1, 2015

@mase-tech your problem is unrelated. I left a note in the issue you submitted (you need to sudo apt-get install wish)

@mase-tech

This comment has been minimized.

Show comment
Hide comment
@mase-tech

mase-tech Jul 2, 2015

I saw it thx :)

mase-tech commented Jul 2, 2015

I saw it thx :)

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Nov 23, 2015

Contributor

Hi, I confirmed that current Git Cola still suffer the same issue, it seems that this issue can only reproduced on a mobile internet connection(ISP: FETNET 4G).

Contributor

Vdragon commented Nov 23, 2015

Hi, I confirmed that current Git Cola still suffer the same issue, it seems that this issue can only reproduced on a mobile internet connection(ISP: FETNET 4G).

@joshuataylor

This comment has been minimized.

Show comment
Hide comment
@joshuataylor

joshuataylor Jan 13, 2016

I'm also getting this.

I'm in Australia, and pushing to the US can take a good 3-10 seconds (Bitbucket), even with:

  ControlMaster auto
  ControlPath /tmp/xxasa%r@%h:%p
  ControlPersist yes
  TCPKeepAlive yes
  ServerAliveInterval 5

This still happens with git cola.

I'll try with tracing to see if I can replicate the issue.

joshuataylor commented Jan 13, 2016

I'm also getting this.

I'm in Australia, and pushing to the US can take a good 3-10 seconds (Bitbucket), even with:

  ControlMaster auto
  ControlPath /tmp/xxasa%r@%h:%p
  ControlPersist yes
  TCPKeepAlive yes
  ServerAliveInterval 5

This still happens with git cola.

I'll try with tracing to see if I can replicate the issue.

@joshuataylor

This comment has been minimized.

Show comment
Hide comment
@joshuataylor

joshuataylor Jan 13, 2016

Got it again with tracing:

git commit -v -F/tmp/git-cola-1FLHXZ/commit-message-zllWTd -> 0: '[ddd xxxxxxx] bbbb
 48 files changed, 1678 insertions(+), 484 deletions(-)
 create mode 100644 tests/bootstrap.php
 ***MORE LOGS HERE***
d2d1d8fd8a49191fb05062fd17784c152cbd96c3.png' ''
git diff-index --cached -z HEAD -- -> 0
git diff-files -z -- -> 0: ':100644 100644 c8075f34d44598425afb072cc1efbdd6da275ab9 0000000000000000000000000000000000000000 Mgit-cola.log' ''
git ls-files --exclude-standard -z --others -- -> 0: 'tc.mwbtc.mwb.bak' ''
git for-each-ref --format=%(refname) refs/remotes -> 0: 'refs/remotes/origin/HEAD
refs/remotes/origin/ddd
refs/remotes/origin/master
refs/remotes/origin/static' ''

joshuataylor commented Jan 13, 2016

Got it again with tracing:

git commit -v -F/tmp/git-cola-1FLHXZ/commit-message-zllWTd -> 0: '[ddd xxxxxxx] bbbb
 48 files changed, 1678 insertions(+), 484 deletions(-)
 create mode 100644 tests/bootstrap.php
 ***MORE LOGS HERE***
d2d1d8fd8a49191fb05062fd17784c152cbd96c3.png' ''
git diff-index --cached -z HEAD -- -> 0
git diff-files -z -- -> 0: ':100644 100644 c8075f34d44598425afb072cc1efbdd6da275ab9 0000000000000000000000000000000000000000 Mgit-cola.log' ''
git ls-files --exclude-standard -z --others -- -> 0: 'tc.mwbtc.mwb.bak' ''
git for-each-ref --format=%(refname) refs/remotes -> 0: 'refs/remotes/origin/HEAD
refs/remotes/origin/ddd
refs/remotes/origin/master
refs/remotes/origin/static' ''
@biji

This comment has been minimized.

Show comment
Hide comment
@biji

biji Jan 15, 2016

Also happened to me, but actually changes pushed to server. Kill git-cola , git status, all set.

But it would be great it git-cola, dont hang 🆒

Probably because pushing to https?

biji commented Jan 15, 2016

Also happened to me, but actually changes pushed to server. Kill git-cola , git status, all set.

But it would be great it git-cola, dont hang 🆒

Probably because pushing to https?

@joshuataylor

This comment has been minimized.

Show comment
Hide comment
@joshuataylor

joshuataylor Jan 25, 2016

I'm not pushing to https, using ssh.

joshuataylor commented Jan 25, 2016

I'm not pushing to https, using ssh.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Jan 25, 2016

Member

Is this a windows-only problem? I am asking because of this block of code from cola/git.py:

    if sys.platform == 'win32':
        # If git-cola is invoked on Windows using "start pythonw git-cola",
        # a console window will briefly flash on the screen each time
        # git-cola invokes git, which is very annoying.  The code below
        # prevents this by ensuring that any window will be hidden.
        startupinfo = subprocess.STARTUPINFO()
        startupinfo.dwFlags = subprocess.STARTF_USESHOWWINDOW
        startupinfo.wShowWindow = subprocess.SW_HIDE
        extra['startupinfo'] = startupinfo

Also, does this problem only occur when the remote requires a password? If so, then my guess is that Git itself is trying to show the askpass prompt but since we've set those flags the window never appears, and thus it appears "stuck".

Does removing that snippet make any difference? It's a wild guess.

Here's another debugging question -- has anyone here ran into this problem when git-cola is launched from the command line? Try launching it that way, in the foreground and see if the problem occurs. My guess is that Git may be prompting on stdin, on the terminal from whence git-cola was launched. If this is the root cause then you should see a password prompt in that terminal.

Let me know if any of this makes sense. I'm curious what you're seeing in the terminal, and whether removing the snippet makes a difference. These are two independent variables that should be tried independently.

Member

davvid commented Jan 25, 2016

Is this a windows-only problem? I am asking because of this block of code from cola/git.py:

    if sys.platform == 'win32':
        # If git-cola is invoked on Windows using "start pythonw git-cola",
        # a console window will briefly flash on the screen each time
        # git-cola invokes git, which is very annoying.  The code below
        # prevents this by ensuring that any window will be hidden.
        startupinfo = subprocess.STARTUPINFO()
        startupinfo.dwFlags = subprocess.STARTF_USESHOWWINDOW
        startupinfo.wShowWindow = subprocess.SW_HIDE
        extra['startupinfo'] = startupinfo

Also, does this problem only occur when the remote requires a password? If so, then my guess is that Git itself is trying to show the askpass prompt but since we've set those flags the window never appears, and thus it appears "stuck".

Does removing that snippet make any difference? It's a wild guess.

Here's another debugging question -- has anyone here ran into this problem when git-cola is launched from the command line? Try launching it that way, in the foreground and see if the problem occurs. My guess is that Git may be prompting on stdin, on the terminal from whence git-cola was launched. If this is the root cause then you should see a password prompt in that terminal.

Let me know if any of this makes sense. I'm curious what you're seeing in the terminal, and whether removing the snippet makes a difference. These are two independent variables that should be tried independently.

@joshuataylor

This comment has been minimized.

Show comment
Hide comment
@joshuataylor

joshuataylor Jan 25, 2016

@davvid

I'm getting this on Ubuntu/XFCE (same as reporter), with SSH remote (doesn't require a password). Sometimes it works, sometimes it doesn't (yes, got to love bugs like those, hey!).

I've run it from the command line with tracing (as you can see above), and no error log is shown - it just freezes.

Launching git cola is instantaneous, and this only happens AFTER a push, so reopening isn't a massive deal.

joshuataylor commented Jan 25, 2016

@davvid

I'm getting this on Ubuntu/XFCE (same as reporter), with SSH remote (doesn't require a password). Sometimes it works, sometimes it doesn't (yes, got to love bugs like those, hey!).

I've run it from the command line with tracing (as you can see above), and no error log is shown - it just freezes.

Launching git cola is instantaneous, and this only happens AFTER a push, so reopening isn't a massive deal.

@biji

This comment has been minimized.

Show comment
Hide comment
@biji

biji Jan 25, 2016

Last line of trace, pushing to bitbucket , https, ubuntu:

git -c diff.suppressBlankEmpty=false for-each-ref --format=%(refname) refs/remotes -> 0: 'refs/remotes/origin/master' ''

biji commented Jan 25, 2016

Last line of trace, pushing to bitbucket , https, ubuntu:

git -c diff.suppressBlankEmpty=false for-each-ref --format=%(refname) refs/remotes -> 0: 'refs/remotes/origin/master' ''
@nekromoff

This comment has been minimized.

Show comment
Hide comment
@nekromoff

nekromoff Feb 14, 2016

I confirm, happening on
Description: Ubuntu 14.04.3 LTS
git-cola: The highly caffeinated git GUI v1.9.3

I can kill cola it by Xkill after it successfully pushed to a git, but it's sort of annoying.

nekromoff commented Feb 14, 2016

I confirm, happening on
Description: Ubuntu 14.04.3 LTS
git-cola: The highly caffeinated git GUI v1.9.3

I can kill cola it by Xkill after it successfully pushed to a git, but it's sort of annoying.

@biji

This comment has been minimized.

Show comment
Hide comment
@biji

biji Feb 16, 2016

Doing killall git-credential-cache--daemon fixes it

biji commented Feb 16, 2016

Doing killall git-credential-cache--daemon fixes it

@nekromoff

This comment has been minimized.

Show comment
Hide comment
@nekromoff

nekromoff Feb 16, 2016

That's nice, but kill or Xkill is not a solution, just a workaround.

nekromoff commented Feb 16, 2016

That's nice, but kill or Xkill is not a solution, just a workaround.

@biji

This comment has been minimized.

Show comment
Hide comment
@biji

biji Feb 16, 2016

yup, maybe that can help fixing this issue

biji commented Feb 16, 2016

yup, maybe that can help fixing this issue

@anderben

This comment has been minimized.

Show comment
Hide comment
@anderben

anderben Mar 3, 2016

I never had this issue until I enabled the git credential cache feature in git. Now git-cola hangs on the occasions when I push to a remote repository and am prompted to enter my credentials because the cache period has expired. The push does actually reach the remote repository even though the UI has locked up. As biji commented, doing 'killall...' returns control to the user.

anderben commented Mar 3, 2016

I never had this issue until I enabled the git credential cache feature in git. Now git-cola hangs on the occasions when I push to a remote repository and am prompted to enter my credentials because the cache period has expired. The push does actually reach the remote repository even though the UI has locked up. As biji commented, doing 'killall...' returns control to the user.

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Mar 3, 2016

Contributor

I'm also uses the credential cache, it seems that it is related to this.

Contributor

Vdragon commented Mar 3, 2016

I'm also uses the credential cache, it seems that it is related to this.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Mar 4, 2016

Member

For windows users, can you please try:
https://github.com/Microsoft/Git-Credential-Manager-for-Windows

OS X users seem to be covered by:
https://samuel.kadolph.com/2011/03/store-your-git-https-passwords-in-your-os-x-keychain/

Linux users can probably use the git-credential-gnome-keyring, as described here:
https://wiki.archlinux.org/index.php/GNOME/Keyring#GNOME_Keyring_and_Git

(also https://github.com/pah/git-credential-helper)

The git-credential-gnome-keyring helper can be found within the git project's contrib/ directory:

https://github.com/git/git/tree/master/contrib/credential/gnome-keyring

I would highly appreciate it if folks could test these solutions and provide your feedback. We should update our documentation to point users towards the steps that end up being successful for y'all, so please let me know.

Another option I heard online is that perhaps the core.askpass variable can be set so that Git's credential prompt uses that program instead of going to the terminal.

That would be an alternative. The way to test that alternative is to do:

git config --global core.askpass /usr/lib/git-core/git-gui--askpass
# adjust the path accordingly for your platform

You can use any available askpass program using this approach. e.g. you can do sudo apt-get install ssh-askpass-gnome and then use /usr/lib/openssh/gnome-ssh-askpass instead git-gui one.

Please let me know if either or both of these approaches work.

Member

davvid commented Mar 4, 2016

For windows users, can you please try:
https://github.com/Microsoft/Git-Credential-Manager-for-Windows

OS X users seem to be covered by:
https://samuel.kadolph.com/2011/03/store-your-git-https-passwords-in-your-os-x-keychain/

Linux users can probably use the git-credential-gnome-keyring, as described here:
https://wiki.archlinux.org/index.php/GNOME/Keyring#GNOME_Keyring_and_Git

(also https://github.com/pah/git-credential-helper)

The git-credential-gnome-keyring helper can be found within the git project's contrib/ directory:

https://github.com/git/git/tree/master/contrib/credential/gnome-keyring

I would highly appreciate it if folks could test these solutions and provide your feedback. We should update our documentation to point users towards the steps that end up being successful for y'all, so please let me know.

Another option I heard online is that perhaps the core.askpass variable can be set so that Git's credential prompt uses that program instead of going to the terminal.

That would be an alternative. The way to test that alternative is to do:

git config --global core.askpass /usr/lib/git-core/git-gui--askpass
# adjust the path accordingly for your platform

You can use any available askpass program using this approach. e.g. you can do sudo apt-get install ssh-askpass-gnome and then use /usr/lib/openssh/gnome-ssh-askpass instead git-gui one.

Please let me know if either or both of these approaches work.

@biji

This comment has been minimized.

Show comment
Hide comment
@biji

biji Mar 4, 2016

Thanks @davvid under linux, I prefer doing:

git config --global core.askpass /usr/lib/git-core/git-gui--askpass

than compiling git-credential-gnome-keyring. And the solution fixes this issue 👍

biji commented Mar 4, 2016

Thanks @davvid under linux, I prefer doing:

git config --global core.askpass /usr/lib/git-core/git-gui--askpass

than compiling git-credential-gnome-keyring. And the solution fixes this issue 👍

@nekromoff

This comment has been minimized.

Show comment
Hide comment
@nekromoff

nekromoff Mar 4, 2016

I am not using Gnome, so adding anything of Gnome does not make sense.
What's the option for KDE-based systems?

On Fri, Mar 4, 2016 at 9:12 AM, David Aguilar notifications@github.com
wrote:

For windows users, can you please try:
https://github.com/Microsoft/Git-Credential-Manager-for-Windows

OS X users seem to be covered by:

https://samuel.kadolph.com/2011/03/store-your-git-https-passwords-in-your-os-x-keychain/

Linux users can probably use the git-credential-gnome-keyring, as
described here:
https://wiki.archlinux.org/index.php/GNOME/Keyring#GNOME_Keyring_and_Git

(also https://github.com/pah/git-credential-helper)

The git-credential-gnome-keyring helper can be found within the git
project's contrib/ directory:

https://github.com/git/git/tree/master/contrib/credential/gnome-keyring

I would highly appreciate it if folks could test these solutions and
provide your feedback. We should update our documentation to point users
towards the steps that end up being successful for y'all, so please let me
know.

Another option I heard online is that perhaps the core.askpass variable
can be set so that Git's credential prompt uses that program instead of
going to the terminal.

That would be an alternative. The way to test that alternative is to do:

git config --global core.askpass /usr/lib/git-core/git-gui--askpass

adjust the path accordingly for your platform

You can use any available askpass program using this approach. e.g. you
can do sudo apt-get install ssh-askpass-gnome and then use
/usr/lib/openssh/gnome-ssh-askpass instead git-gui one.

Please let me know if either or both of these approaches work.


Reply to this email directly or view it on GitHub
#377 (comment).

nekromoff commented Mar 4, 2016

I am not using Gnome, so adding anything of Gnome does not make sense.
What's the option for KDE-based systems?

On Fri, Mar 4, 2016 at 9:12 AM, David Aguilar notifications@github.com
wrote:

For windows users, can you please try:
https://github.com/Microsoft/Git-Credential-Manager-for-Windows

OS X users seem to be covered by:

https://samuel.kadolph.com/2011/03/store-your-git-https-passwords-in-your-os-x-keychain/

Linux users can probably use the git-credential-gnome-keyring, as
described here:
https://wiki.archlinux.org/index.php/GNOME/Keyring#GNOME_Keyring_and_Git

(also https://github.com/pah/git-credential-helper)

The git-credential-gnome-keyring helper can be found within the git
project's contrib/ directory:

https://github.com/git/git/tree/master/contrib/credential/gnome-keyring

I would highly appreciate it if folks could test these solutions and
provide your feedback. We should update our documentation to point users
towards the steps that end up being successful for y'all, so please let me
know.

Another option I heard online is that perhaps the core.askpass variable
can be set so that Git's credential prompt uses that program instead of
going to the terminal.

That would be an alternative. The way to test that alternative is to do:

git config --global core.askpass /usr/lib/git-core/git-gui--askpass

adjust the path accordingly for your platform

You can use any available askpass program using this approach. e.g. you
can do sudo apt-get install ssh-askpass-gnome and then use
/usr/lib/openssh/gnome-ssh-askpass instead git-gui one.

Please let me know if either or both of these approaches work.


Reply to this email directly or view it on GitHub
#377 (comment).

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Mar 5, 2016

Member

@nekromoff does the askpass option work for you?

I read the git code, and the odd thing is that it should already be using our askpass program via the $GIT_ASKPASS variable we export, but @biji suggested that configuring it can do the trick.

If the askpass thing works then integration with kwallet could be done by using ksshaskpass as your askpass program.

Member

davvid commented Mar 5, 2016

@nekromoff does the askpass option work for you?

I read the git code, and the odd thing is that it should already be using our askpass program via the $GIT_ASKPASS variable we export, but @biji suggested that configuring it can do the trick.

If the askpass thing works then integration with kwallet could be done by using ksshaskpass as your askpass program.

@Vdragon

This comment has been minimized.

Show comment
Hide comment
@Vdragon

Vdragon Mar 13, 2018

Contributor

No longer reproduces recently :-/ Assuming fixed.

Contributor

Vdragon commented Mar 13, 2018

No longer reproduces recently :-/ Assuming fixed.

@Vdragon Vdragon closed this Mar 13, 2018

@joshuataylor

This comment has been minimized.

Show comment
Hide comment
@joshuataylor

joshuataylor Mar 13, 2018

I use git cola a lot and haven't had this issue since above.

joshuataylor commented Mar 13, 2018

I use git cola a lot and haven't had this issue since above.

@firestar9114

This comment has been minimized.

Show comment
Hide comment
@firestar9114

firestar9114 Sep 20, 2018

I am having this issue, how do I set it to use "ksshaskpass"? I am on Manjaro btw, using kde.

firestar9114 commented Sep 20, 2018

I am having this issue, how do I set it to use "ksshaskpass"? I am on Manjaro btw, using kde.

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Sep 20, 2018

Member

We honor both GIT_ASKPASS and SSH_ASKPASS set in the environment, via git.

https://git-scm.com/docs/gitcredentials.html

cola just launches git push like a regular user, so that's the simplest way to debug it.

Member

davvid commented Sep 20, 2018

We honor both GIT_ASKPASS and SSH_ASKPASS set in the environment, via git.

https://git-scm.com/docs/gitcredentials.html

cola just launches git push like a regular user, so that's the simplest way to debug it.

@firestar9114

This comment has been minimized.

Show comment
Hide comment
@firestar9114

firestar9114 Sep 20, 2018

Doing a git push via terminal seems to work opening a prompt for a username and then a prompt for a password. It only breaks in git-cola when I push the branch:
https://i.imgur.com/xWVA3vQ.png

firestar9114 commented Sep 20, 2018

Doing a git push via terminal seems to work opening a prompt for a username and then a prompt for a password. It only breaks in git-cola when I push the branch:
https://i.imgur.com/xWVA3vQ.png

@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Sep 20, 2018

Member

Hmm it needs wish installed, which is provided by tcl/tk. It seems like you're on windows. I would have expected Git for Windows to provide wish.exe. You could try removing the compat.setenv calls with GIT_ASKPASS and SSH_ASKPASS in cola/app.py and see if that makes a difference. If that works then we can consider removing those calls when running on Windows.

Member

davvid commented Sep 20, 2018

Hmm it needs wish installed, which is provided by tcl/tk. It seems like you're on windows. I would have expected Git for Windows to provide wish.exe. You could try removing the compat.setenv calls with GIT_ASKPASS and SSH_ASKPASS in cola/app.py and see if that makes a difference. If that works then we can consider removing those calls when running on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment