1

Trying to use the git integration in Creator I keep getting an inauspicious:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

SSH wise I have set up everything correctly - they key are generated in the right location, all extra configuration is completed.

Testing in the git-bash confirms that it all works:

$ ssh -T git@bitbucket.org
logged in as myusername.

You can use git or hg to connect to Bitbucket. Shell access is disabled.

ssh-add -l lists the key correctly. I have started with the Creator's "defaults" as suggested that it should just work, and after it didn't I pretty much tried every possible thing that came to my mind and as internet search results - to no avail.

From a pure cmd (not git bash) I am able to clone, but git still asks me about the passphrase, should it be doing that with the ssh keys set up?

Any ideas?

Community
  • 1
  • 1
dtech
  • 46,382
  • 17
  • 102
  • 175
  • Since you mention `cmd` I'm assuming this is Windows? Which version? Is it in a VM? I was getting identical errors in VMWare Fusion 8.1/Win7 guest which turned out to be a [VMWare NAT issue](https://communities.vmware.com/thread/518949?tstart=0). But I don't see how you'd log into bitbucket if that were your problem... – eclarkso May 02 '16 at 20:56
  • OS is windows 7 x64, no VM. As far as git is concerned, it all works just fine, it is only Creator's way of invoking git that is problematic for some reason. Also, I got auto authentication to work over https, so in that case it is definitely picking up the _netrc file, but it doesn't seem to pick up the ssh keys, even though they are in the "default" location just as _netrc. – dtech May 02 '16 at 21:18
  • Does anything in [this](http://stackoverflow.com/questions/20336561/what-is-the-correct-way-to-configure-qt-creator-to-use-git) help? – eclarkso May 03 '16 at 13:04
  • @eclarkso - don't you think I've already tried the link I linked to this question to begin with ;) – dtech May 03 '16 at 13:06
  • Ugh, sorry, careless. I think I read the link yesterday and then re-found it... Is this with msysGit or the newer "git for windows"? What version of Qt Creator? Certainly doesn't make sense to me either from your description. – eclarkso May 03 '16 at 17:06
  • You said you looked at lots of search results... [this one too](http://guides.beanstalkapp.com/version-control/git-on-windows.html)? Among other things, it warns that TortoiseGit messes with the GIT_SSH env. var, which will bork where it looks for the keys. But if you can already clone outside of Qt Creator, that doesn't sound right either. This is going to drive me crazy. – eclarkso May 03 '16 at 17:11

1 Answers1

0

Almost a year later still no luck. I did find a work-around however, in order to simply get git working from Creator, following those simple steps:

  • create the repo
  • push the initial project from command prompt git (that works just fine)
  • clone from the HTTPS (not SSH) repo in creator via New Project - Import Project - Git Clone
  • now you can use git from Creator
dtech
  • 46,382
  • 17
  • 102
  • 175