Can Heroku use x64 installation of Git on Windows? - windows

I had previously installed Git x64 on Windows 7 (So it is sitting in C:\Program Files\Git). Then I installed Heroku toolbelt.
It included an installation of Git as well, and installed a x32 bit version of Git (as well as a different version). I was not happy about this, since it is polluting my already tight PATH variable, which bombs out on Windows 7 after it exceeds 2048 chars (approx..). So I uninstalled Git x32 version.
Git still works for me on the command line, but if I issue the heroku command:
git push heroku master
It gives the error:
fatal: unable to access 'https://git.heroku.com/infinite....git/':
error setting certificate verify locations:
CAfile: C:/Program Files (x86)/Git/mingw32/ssl/certs/ca-bundle.crt
CApath: none
So it is looking for ca-bundle.crt. I see this same file exists under C:\Program Files\Git... (i.e. under the x64 bit installation).
Is it possible to make Heroku use that installation?

I worked around this issue by simply copying the ca-bundle.crt file from the x64 installation to the required folder i.e. C:/Program Files (x86)/Git/mingw32/ssl/certs/ca-bundle.crt, even though Git 32 bit is not installed...

Related

GitExtensions - Gource plugin

So I'm using GitExtensions as GUI for Git, and wanted to visualize my repo with the help of Gource.
But eventhough I installed it correctly, and set the "Path to 'gource'" accordingly, GitExtensions still is unable to find it.
Error message: 'Cannot find "gource" in the configured path:
C:\Program Files (x86)\Gource. Do you want to reset the configured
path?
GitExtensions Version 2.48.05
Git Version 1.9.4.msysgit.1
Gource Version 0.42
Windows 10 64-bit
Gource install path: C:\Program Files (x86)\Gource
This is a known GitExtensions bug (#3345). It'll be fixed in GitExtensions 2.49.

Correct git.exe path for TortoiseGit under Git for windows 2.4

I have installed the Git for windows 2.4.1 release candidate (64bit)
It seems that after installation the following has been added to the system path
C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin
But with that setting it seems that TortoiseGit stops working. When I try to do a git operation in TortoiseGit, it cannot find my git username anymore.
I have version 1.8.14.0 of TortoiseGit, which is the latest.
The TortoiseGit Git.exe Path setting currently points to C:\Program Files\Git\cmd.
In the TortoiseGit documentation it states
There is a known issue in msysGit/Git for Windows: Git for Windows
provides two git.exe-files (one in a folder named bin and one in a
folder named cmd). Make sure Git.exe Path points to the bin-folder
within the Git for Windows installation folder.
In Git 2.4 there is a folder C:\Program Files\Git\usr\bin, but that no longer contains the git.exe binary.
The git.exe binary is found in both C:\Program Files\Git\cmd and C:\Program Files\Git\mingw64\bin but neither of those settings work for TortoiseGit.
All of these answers are wrong.
The Git.exe Path in setting is set incorrect.
Steps to fix:
Right click on git respostory
Select TottoiseGit | Settings
You will get the warning dialog
Dismiss it
You will get another dialog, select ignore
Settings will launch
Select: General (at the top of the tree)
In the edit field for Git.exe path (half way down) enter the Git.exe path
(in my case C:\ProgramFiles\Git\bin)
That's it!
Check to make sure that your %HOME% variable in Windows is set so that TortoiseGit can find your .gitconfig file.
TortoiseGit 1.8.14.1 (preview release) has full support for Git for Windows 2.x (no need for workarounds with adding unneeded folders to %PATH%). Before this version, TortoiseGit cannot find the git system config of Git for Windows 2.x.
The warning you are getting means that you haven't set up the user.name and user.email git config settings. This can be done for a project or also globally (in %HOME%\.gitconfig: TortoiseGit here uses the %HOME% environment variable - if it is not set TortoiseGit uses your Windows home directory automatically).
I was also getting the same error. I installed git from here. And then tried to install tortoisegit, it worked.

git on windows 7 expecting dev null not found error

I'm using Git gui or Git bash on Windows 7 SE 64bit, and I keep getting a weird error. It was working fine before; I haven't made any changes or installed/uninstalled anything. I have already reinstalled and restarted my computer but I'm still getting the same error.
Here goes: after a soft restart, I get
Cannot determine Git version:
fatal: open/dev/null or dup failed: No such file or directory
Git gui requires Git 1.5.0 or later"
Here is a screenshot of the error window that pops up:
Any help?
Usually, installing Git using the parameters by default, it should create the folder structure /dev/null in C:\program files\.git Like C:\program files\git\dev\null.
I have installed Git 2.7.0.2 64-bit in a VM machine with Windows 10 64-bit. It created these folders /dev/null and in another machine with the same OS it doesn't create those folders, even using the same installer.
Creating this folder manually, the message disappear.
No idea why it doesn't create, even whether antivirus or windows defender are disabled.

Msysgit git no longer finds ssh keys

I have an older Windows XP laptop on which I recently upgraded git to 1.8.4.msysgit.0, in order to benefit from the new cmd\git.exe instead of the older cmd\git.cmd for scripts.
After this upgrade, git asks for a password for its operations (such as cloning), where it did not before the upgrade. None the of the ssh keys were changed in any way.
The strange thing is that both
"c:\Program Files\Git\bin\ssh.exe" user#x.x.x.x
"c:\Program Files\Git\bin\git.exe" clone user#x.x.x.x:/path/to/repo
work, but
"c:\Program Files\Git\cmd\git.exe" clone user#x.x.x.x:/path/to/repo
does not.
Background information:
I tried setting %HOME%, but this did not help.
I did the exact upgrade for a win7 computer, without problems.
%PATH% includes the cmd folder of the git installation, not the bin folder.
Update1:
After messing around a bit, I noticed the ssh command also asks for a password if the %HOME% variable is set. It was set using set HOME=%HOMEDRIVE%%HOMEPATH% which resolves to c:\Documents and Settings\username.
Old versions of msysgit apparantly kept their ssh keys in the Git installation folder (c:\Documents and Settings\username\.ssh). There were 2 files in this folder (id_rsa and id_rsa.pub) that were not present in the ssh folder in the home folder. After copying these, the problem was solved.

Mercurial extensions not working in Windows 7 x64?

We are test driving Mercurial at work. We don't want to have to enter our user/pass each time we interact with a repository, so we set up the mercurial_keyring extension. We:
Installed Python 2.6.5 (32 or 64 bit, depending on the system)
Installed setuptools (for easy_install.exe)
easy_install keyring
easy_install mercurial_keyring
And then made the appropriate changes to %userprofile%/mercurial.ini in the [auth] section. It works fine on my colleague's computer (32bit xp sp3), but it does not work on my machine (Windows 7 Ultimate x64). Also noteworthy, the setuptools had to be built from source on Win 7 x64 (python setup.py bdist_wininst, then run the resulting setuptools-0.6c11.win-amd64.exe).
Using just hg.exe from the Mercurial 1.5 binary installation (the .msi), I get this error when I run hg.exe:
*** failed to import extension mercurial_keyring: No module named
mercurial_keyring
I tried to change my mercurial.ini, to specify the path to the mercurial_keyring.py file, instead of having mercurial find it (since it's in the PYTHONPATH).
Old:
[extensions]
mercurial_keyring =
New:
[extensions] mercurial_keyring =
c:/mercurial/extensions/mercurial_keyring.py
The error changes to:
abort: could not import module
keyring!
So while providing the path to the mercurial_keyring extension works, the dependent keyring module still cannot be found.
After further investigation, it appears that NO extensions work. They all produce the error:
*** failed to import extension [extension name]: No module named
[module name]
It appears that when running hg.exe, it is not aware of PYTHONPATH. I have tried:
Python 2.6.5 32 bit
Python 2.6.5 64 bit
Building Mercurial 1.5 from source with MinGW
Building Mercurial 1.5 from source with MSVC9
Using hg.exe from the 1.5 binary dist (.msi)
Using the hg.py in c:\python26\scripts when building from source
Various configurations in %userprofile%/mercurial.ini
Using setuptools (easy_install.exe) to install keyring and mercurial_keyring
Building keyring and mercurial_keyring from source (python setup.py bdist_wininst)
Nothing works. The closest I've got is using hg.py when building from source. It at least doesn't give me errors, and actually creates %userprofile%/wincrypto_pass.cfg when I enter my credentials. But on subsequent requests, it doesn't enter the credentials automatically. It prompts me for them again.
Interestingly, TortoiseHG is using the keyring. I just can't get it to work on the command line. I think something is going on with Win 7 x64 that is preventing mercurial (hg.exe) from seeing the PYTHONPATH, so it can't find any of the installed modules.
Does anyone have extensions working in Win 7 x64? Specifically with the binary installation of mercurial (not hg.py)?
UPDATE
I've found a suitable work around for now. Since TortoiseHG does work with mercurial_keyring, I've simply changed my PATH setup to include the tortoiseHG folder, but not c:\mercurial. Now when I type "hg" at the command line, it's using the hg.exe in the tortoiseHG folder, which works fine. Just the same, this is still a problem with mercurial extensions on Win 7 x64. Answers welcome.
Answering my own question with my previous update, since there are no other takers yet.
Suitable workaround: Since TortoiseHG does work with mercurial_keyring, I've simply changed my PATH to include the tortoiseHG folder, and exclude c:\mercurial. Now when I type "hg" at the command line, it's using the hg.exe in the tortoiseHG folder, which works fine with the keyring.
I'm using:
on Windows Server 2008 SP2 x86:
Python 2.6.5 x86
Mercurial 1.5.1 x86
TortoiseHg 1.0.1 x86
on Windows Server 2008 R2:
Python 2.6.5 x86
Mercurial 1.5.1 x86
TortoiseHg 1.0.1 x64
On both setups, all configured extensions are loaded without errors.
All tools are installed using the installers provided on their sites. Mercurial appears before TortoiseHg in PATH. I'm using a common configuration file ~/.hgrc for both tools, and a Mercurial.ini file in TortoiseHg installation folder that is loading just the mercurial_keyring extension.
On the command line I have to input the password every time it's needed, but in TortoiseHg the keyring extensions it's fully working.
From the Keyring Extension page on the Mercurial wiki:
If you are on Windows, we recommend you use TortoiseHg. THG ships with Windows specific keyring backends, without which the mercurial-keyring extension cannot function properly on Windows.
UPDATE http://asimilatorul.com/adapter/post/using-mercurial_keyring-extension-with-mercurial-on-windows/
You can copy the required files from TortoiseHg's library.zip into Mercurial's library.zip:
hgext\mercurial_keyring.pyo
keyring__init__.pyo
keyring\backend.pyo
keyring\core.pyo
win32_crypto.pyd
The extension page states that TortoiseHG has some additional components to make it work on Windows and that it doesn't work properly without them. It sounds like the workaround of referencing the TortoiseHG version may be the easiest way to get it working on Windows.

Resources