git clone from Linux to TFS git repo

前端 未结 2 467
故里飘歌
故里飘歌 2021-01-07 02:26

I\'ve been trying to solve an issue with Git repo that is hosted on an on-prem TFS2017, cannot do a \"git clone\" command from a linux machine which is not in the domain, ke

相关标签:
2条回答
  • 2021-01-07 02:37

    First, please double confirm you have followed this tutorial-- Use SSH key authentication to connect to your Git repos. Avoid adding whitespace or new lines into the Key Data field-they can cause VSTS to use an invalid public key.

    Besides, you could also try to configure Basic Authentication on your TFS Application Tier server or use Git Credential Managers to authenticate from Linux. This will narrow down if the issue is related your ssh authentication type or environment on your Linux machine.

    Try to disable the firewall on the Linux build agent during the git clone command test.

    0 讨论(0)
  • 2021-01-07 02:53

    Ive managed to overcome the issue, one of the steps was to configure the SSH authentication..
    1. On the Linux Machine, ive added the TFS server to HOSTS file and installed Git client.
    Then ive followed this guide guide for ContOS >> AD authentication, i followed up to step 4.
    2. On the Linux machine generate Public Key using "ssh-keygen", and use this key as
    3. On the TFS web page, at the user icon, we have security tab, went to SSH public keys and added the generated key from Linux (must be from public key, not private).
    4. Eventually from the Linux i type in the full repo address, for example git clone ssh://tfs.domain.com:22/Defaultcollection/_projectname/git

    It will prompt you to authorize the RSA connection, and that's it.
    Hope that helps.

    0 讨论(0)
提交回复
热议问题