3

I am trying to push my code from Eclipse to git in my organisation TFS(Team Foundation Server). I have followed the link https://www.visualstudio.com/en-us/docs/git/share-your-code-in-git-eclipse to push the code. But while pushing the branch to tfs server I am getting error.

    org.eclipse.jgit.errors.TransportException: http://***.*******.*******.***:****/tfs/****/****/**********/***/********: authentication not supported
    at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:488)
    at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:387)
    at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:154)
    at org.eclipse.jgit.transport.Transport.push(Transport.java:1200)
    at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:197)
    at org.eclipse.egit.ui.internal.push.ConfirmationPage$2.run(ConfirmationPage.java:209)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

I have tried various ways to find a perfect solution but till now I have not found any. Can anyone help me with this. Also would like to highlight the tfs remote repository already has a readme.md file, would that cause any issue while pushing the code. If yes can anyone provide a viable solution.

Note :- I need the solution which I can use in Eclipse to solve this issue.

Ashit_Kumar
  • 601
  • 2
  • 10
  • 28
  • Which version of TFS are you using? Are you able to push a branch to tfs from git command on the machine that has Eclipse installed? – Cece Dong - MSFT Jan 16 '17 at 09:33

2 Answers2

1

The possible solutions to your problem are explained in the FAQ: the reason is that NTLM authentication is not supported by the JGit plugin of Eclipse, which is used indirectly by Team Explorer Everywhere (aka TEE) by means of EGit. Possible solutions with TFS 2015 RTM and up:

  • enable HTTP Basic Authentication on TFS (within IIS); this is a server side change;
  • use CNTLM to overcome the limitation of JGit and use properly the NTLM authentication; this is a client side modification you could do on your Eclipse installation;
  • enable Kerberos authentication in IIS on your TFS server, as explained in the above mentioned FAQ as well; this is already the default on TFS 2017+.

With TFS 2017 RTW and up you could create a Personal Access Token with scope at least Code (read and write), then you could use it instead of your password in the Eclipse EGit configuration.

Luca Cappa
  • 1,925
  • 1
  • 13
  • 23
  • 1
    Or, with TFS 2017, you can use PATs for authentication. – Daniel Mann Jan 07 '17 at 17:08
  • @Luca Cappa thanks for the reply but making changes to tfs server is not in my hand as its a org. server and it will take lot of process to enable this ... anything which I can do at my end with eclipse or any config. changes do tell me. Thanks – Ashit_Kumar Jan 07 '17 at 17:11
  • which version of TFS is it? as @Daniel said, you could also use a Personal Access Token, or CNTLM as the second option in my answer – Luca Cappa Jan 07 '17 at 17:12
  • @LucaCappa ok .. i got it now .. I have tfs version 2017. I can generate PAT for access. But I am unable to find a way how to use the pat key in eclipse to push my project . Is there any doc or video which you can share. – Ashit_Kumar Jan 07 '17 at 21:18
  • @Ashit_Kumar you could use the PAT you created in place of the 'password' following the [instructions you linked](https://www.visualstudio.com/en-us/docs/git/share-your-code-in-git-eclipse) – Luca Cappa Jan 08 '17 at 11:44
  • @LucaCappa I have tried using PAT access token as mentioned in the link but still getting authentication not supported error. – Ashit_Kumar Jan 09 '17 at 10:22
  • the `here` link is 404 :( the kerebos one too – 463035818_is_not_an_ai Oct 29 '20 at 12:04
0

Install TortoiseGit, do Pull... and Push.... Try again in Eclipse. Worked for me.

ceklock
  • 6,143
  • 10
  • 56
  • 78