Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator 2.8, git push and Macintosh

Qt Creator 2.8, git push and Macintosh

Scheduled Pinned Locked Moved Qt Creator and other tools
7 Posts 2 Posters 7.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    EricRFMA
    wrote on last edited by
    #1

    Hello...

    I was trying to access my remote git repository, after successfully creating one locally. I'm running Qt Creator 2.8 on Mac 10.7.5. My first problem was this error:

    bq. error: cannot run ssh-askpass: No such file or directory
    fatal: could not read Username for 'https://github.com': Device not configured

    As it turns out, there's no ssh-askpass for Mac OS 10.7. So...

    Big confusion: The 2.8 doc that I could find doesn't mention this problem. In fact, it doesn't mention the Mac at all. It does mention Linux though, in the context of ssh-askpass, which gave me some clues. As a side note all the pulldown menu descriptions don't apply to the Mac, since they all refer to Tools->Options, whereas on the Mac it's all off the Qt Creator->Preferences menu. But you probably know that already...

    Next, I found a sneaky way someone found to implement ssh-askpass for the Mac. It's kind of convoluted (it uses a bash script and Applescript). And unfortunately, it doesn't work from within Qt Creator, and fails with this error:

    bq. 129:319: execution error: Can’t get application missing value of «script». (-1728)
    error: unable to read askpass response from '/usr/libexec/ssh-askpass'

    I'm guessing the Applescript makes some assumptions about the environment that aren't true in Qt Creator. If anyone is interested, the script can be found here: https://github.com/markcarver/mac-ssh-askpass I don't know enough Applescript to figure out what could be going wrong myself.

    So, my big question is: Can this be made to work on the Mac? Is it a known issue? Is it planned for a future release? Has anyone else seen this?

    It'd be way more convenient to use this feature from within Qt Creator, but I can go to the command line if I have to. And if this functionality isn't ready for prime-time yet, could the option "Tools->Git->Remote Repository" be greyed out?

    Thanks for reading, and for any help or suggestions anyone can provide.

    -Eric

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      git push does work on mac in general.

      My guess is that your ssh key requires a passphrase or something. Creator in general does not really work well with user-interaction during version control operations:-/ This is due to using the command line tools and it being hard to find out when those block to wait for a password instead of just sitting their waiting for data from the server or whatever.

      You could work around this problem with ssh-agent (which will cache be passphrases for your ssh keys for a session) or by removing the passphrase altogether (which of course has some security implications! OTOH, if somebody can read the key files stored in your account then you are in trouble anyway).

      1 Reply Last reply
      0
      • E Offline
        E Offline
        EricRFMA
        wrote on last edited by
        #3

        Hi again Tobias! :)

        I'm using GitHub, which as far as I can tell requires a userid and password. The cobbled-up ssh-askpass I was using was supposed to get around the terminal I/O problem by displaying a GUI prompt for the credentials, but there's something wonky in the LotusScript running from within Creator which is preventing it from working.

        I'll look at ssh-agent, which looks a little daunting at first, but maybe I can bend it to my will.

        Thanks!

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          Github does not require a passphrase on the keys used and can be used fine from Qt Creator.

          I have an account on github, too, so I am pretty sure it actually works (even though I use the command line a lot and mostly work with Qt's gerrit).

          1 Reply Last reply
          0
          • E Offline
            E Offline
            EricRFMA
            wrote on last edited by
            #5

            Hmmmm... you must have something set up differently. When trying to push from Creator, I get the message as seen above, where it's trying to run ssh-askpass to ask for a password. If I run from the command-line, I get:

            @[151] Projects/QtProjects/xyzzy% git push -n --all https://github.com/xxxxx/xyzzy.git
            Username for 'https://github.com': @

            So it's asking me for username (and then password) for github.

            I don't know what the difference is... I also need a username and password to log in to the github.com website.

            Any ideas?

            Thanks!

            -Eric

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              Generate an SSH key and register it with github. Then use SSH to access github.

              That also has the nice benefit of being way faster than going via http(s)!

              1 Reply Last reply
              0
              • E Offline
                E Offline
                EricRFMA
                wrote on last edited by
                #7

                After some poking (and prodding) around, I got all the SSH key and registry stuff done, and voílla, it all works! Thanks!

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved