Cannot pull/push some Github projects

Answered

Hi,

I'm setting up a new Windows workstation for development, having previously used a MacBook, and find that I cannot clone some repositories from Github although I can see them.

With same credentials, I can still fully access them on the MacBook, from IntelliJ and other tools.

Some other repositories can be accessed from IntelliJ on the new Windows workstation.

And the repository that fails, I can access it using SourceTree - I can clone it, then use IntelliJ to work on it and commit files, then have to use SourceTree again to push to it.

I have no idea what the cause of the problem is, and why there's a problem with some but not with other Github repositories.

The error message which I get is:

Push failed

Failed with error: error: unable to read askpass response from          'D:\Users\Tim van der Leeuw\AppData\Local\Temp\git-askpass-0.bat'          error: failed to execute prompt script (exit code 1) fatal: could not          read Password for 'https://tnleeuw@github.com': No error




(Or 'Clone failed', or 'Fetch failed', etc, depending on the action which I tried)

I'm not actually asked for a password, so it could be a failure to open this batchfile - perhaps due to spaces in the path? - but then, I had no problems with another repository.

I'd  appreciate any help on what is wrong with my setup.

IntelliJ versions tried: 14.1.5, 15EAP IU-143.249.6

Kind regards,

--Tim van der Leeuw

0
4 comments

Does it help if you change the repository URL from https to ssh?

0

Hi,

I'm sorry that it took me such a long time to get back on this. I've been busy with work and other things, and been getting by using SourceTree for the communication with GitHub and BitBucket hosts.


I've spent some time on this issue today and came to the conclusion that it is caused by the fact that I have spaces in the path to the TEMP dir (more specifically, spaces in my username, and due to a typo, even a double space).

When I change the TMP and TEMP variables to point to somewhere that doesn't have spaces in it, then I can successfully pull and push from and to Github and Bitbucket (and presumably other hosts but have no projects hosted elsewhere, at the moment).

The type of authentication (password vs ssh) doesn't seem to matter in this.

I hope this helps to pin the problem and fix it.

Kind regards,

--Tim

0
Avatar
Permanently deleted user

Hi @Tim,

where can I change the TMP and TEMP variables?

0

TMP and TEMP are system environment variables, so they can be changes in the system properties. See e.g. https://answers.microsoft.com/en-us/windows/forum/windows_7-files/change-location-of-temp-files-folder-to-another/19f13330-dde1-404c-aa27-a76c0b450818

However, recent IDE version should create the temp scripts like git-askpass in the IDE's system/tmp folder (see https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs) so TMP and TEMP should not affect the behavior

0

Please sign in to leave a comment.