What is the correct way to configure Qt Creator to use Git? What is the correct way to configure Qt Creator to use Git? windows windows

What is the correct way to configure Qt Creator to use Git?


What I have always done:

  1. Install Windows (msys)git: select "only add git to PATH". This adds the Git\cmd directory to system/user-wide PATH, which is safe and very useful.

  2. Don't enter anything in Qt Creator for git. It's in PATH, so it "just works".

  3. Probably the most important due to the limited interactivity between git and Qt Creator: make sure your remote host is aware of your SSH key (so you don't need to enter a password, I don't think Qt Creator can handle that, and I believe this is what's going wrong in your case), and make sure your SSH config file contains the IP of the host as trusted (you can check this by running a git clone or git push from the commandline (not "git bash", just a plain cmd. This ensures your environment is similar to what Qt Creator sees.

I stress that nothing else needs setting up, so if you did, you might have broken something that should work with the above steps.


Well, maybe I have a process that seems to work.

If you use a passphrase during the generation of the keys, you'll have to type this passphrase after loading an ssh-agent and add the key to the agent.

Basically, the solution is: follow the instructions on this page:

https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html

BUT, during the generation of the keys DO NOT TYPE A PASSPHRASE.

Obviously, it's 'weaker' from a security point of view.

But, the .bashrc script will work as expected (loading the identity on git bash startup).

It's necessary to setup git\bin , git\cmd and git\usr\bin folders on the PATH environment variables, so the commands "ssh-agent", "ssh-add" will be executed.

After this, the Qt Creator should work fine for remote repository access (fetch, pull and push).