Menu

#1126 Support ssh-agent for git public key authentication

4.0
closed-fixed
None
5
2016-09-06
2015-09-13
No

Current team feature support for git repository is only with user/password on connetion.

To use with github, which is only public key authentication for ssh connection, it is better for OmegaT to support git+ssh with public key.

It is also better to support ssh-agent.

Discussion

  • Aaron Madlon-Kay

    OmegaT (jgit) already supports public key authentication.

     
  • Aaron Madlon-Kay

    • summary: team support ssh public key authentication --> Support ssh-agent for git public key authentication
    • assigned_to: Aaron Madlon-Kay
     
  • Aaron Madlon-Kay

    Supporting ssh-agent is, however, a new and useful feature.

     
  • Hiroshi Miura

    Hiroshi Miura - 2015-09-14

    If it has already supported it , it is a bug because it does not work with 3.5.1_Beta (git HEAD, 16 Jul, 2015).
    Exactly Jgit support public auth, but OmegaT does not use it well.

    WIth working directory that has a .git/config as follows:

    [core]
    symlinks = false
    repositoryformatversion = 0
    filemode = true
    logallrefupdates = true
    autocrlf = input
    [remote "origin"]
    url = ssh://git@github.com/miurahr/omegat-test.git
    fetch = +refs/heads/:refs/remotes/origin/
    [branch "master"]
    remote = origin
    merge = refs/heads/master

    and I use a key that is located at ~/.ssh-private/github and I have .ssh/config that has a Host section and IdentityFile configuration.

    When open directory, It said "No connection available. the project is in offline mode" even with connection.
    Then working directory is a status of 'HEAD detached at d69a826'

    WIth my patch,
    https://sourceforge.net/u/miurahr9/omegat/ci/git-ssh-connect
    It works when working directory was already cloned.
    It also read .ssh/config and understand IdentityFile configuration and connect properly.

    Also with 3.5.1 Beta.

    When specifying github ssh connection URL "git@github.com:miurahr/omegat-test.git" from menu File->team , it reject it is not a valid URL.

    Also It reject "ssh://git@github.com/miurahr/omegat-test.git" form.

    WIth these results, I think OmegaT does not support Public key auth. Connection with https and user/pass works.

     

    Last edit: Hiroshi Miura 2015-09-22
  • Aaron Madlon-Kay

    Those results are only sufficient to show that OmegaT doesn't support your particular configuration. I have been using public key authentication just fine for years, so it is most definitely supported. My first guess is that your key has a passphrase; keys with passphrases are currently not supported.

    There are a number of problems with your patch; as soon as I am done fixing them I will commit to trunk.

     

    Last edit: Aaron Madlon-Kay 2015-09-14
  • Hiroshi Miura

    Hiroshi Miura - 2015-09-14

    Yes, I use key with passphrase and OmegaT does not ask me it.

     
  • Aaron Madlon-Kay

    Keys with passphrases will be supported after this development hits trunk. In the meantime, you can use public key authentication now if you remove the passphrase from your key.

     
  • Hiroshi Miura

    Hiroshi Miura - 2015-09-22

    It is nonsense to remove passphrase.
    Current OmegaT/JGit just support default key(id_dsa/id_rsa) and no passphrase.

    If using key without passphrase, it should be non default key at least.

     
  • Aaron Madlon-Kay

    Non-default keys are supported just fine if you set up your ~/.ssh/config correctly.

     
  • Aaron Madlon-Kay

    The team code will be changing a lot in 3.6, so this will have to wait until then.

     
  • Aaron Madlon-Kay

    • Group: future --> 3.6
     
  • Didier Briel

    Didier Briel - 2015-12-03
    • Group: 3.6 --> 3.7
     
  • Aaron Madlon-Kay

    • status: open --> open-fixed
     
  • Aaron Madlon-Kay

    Implemented in trunk.

     
  • Didier Briel

    Didier Briel - 2016-09-06
    • status: open-fixed --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2016-09-06

    Implemented in the released version 4.0 of OmegaT.

    Didier

     

Log in to post a comment.

MongoDB Logo MongoDB