Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support TFS2018 #76

Open
genewuwu opened this issue May 17, 2019 · 7 comments
Open

Support TFS2018 #76

genewuwu opened this issue May 17, 2019 · 7 comments
Labels
help wanted waiting for feedback Feedback from reporter is required. Issue will be closed otherwise.

Comments

@genewuwu
Copy link

Can I use the lib in this project to support TFS 2018?
I tried to connect to TFS 2018 directly ,but it failed

@allburov
Copy link
Member

@genewuwu It must work with TFS 2018.
Could you give piece of code and traceback with more information?

@allburov allburov added the waiting for feedback Feedback from reporter is required. Issue will be closed otherwise. label May 19, 2019
@allburov
Copy link
Member

allburov commented Jun 5, 2019

Could someone who work with TFS 2018 give a answer - do the library work with TFS 2018?

@Jowh2
Copy link

Jowh2 commented Jun 12, 2019

@allburov does not seem to be working for me after we upgraded past 2018.
My guess is that basic auth is no longer supported. I'm getting error 401 with same code as before with a link that works fine when I visit it manually.
Edit: added PAT to my connection string and now it's working fine again.

@allburov
Copy link
Member

@Jowh2 something like this?

client = TFSAPI("https://tfs.tfs.ru/tfs/", pat=personal_access_token)

I will add info about TFS2018 to docs soon

@Jowh2
Copy link

Jowh2 commented Jun 13, 2019

@allburov username=username, pat=pat (after generating one for your tfs user that is).
It's actually somewhat documented under the authorization section which is how I found the solution.

https://devopshq.github.io/tfs/examples.html#create-connection

@Jowh2
Copy link

Jowh2 commented Jun 13, 2019

Actually it might work without username as well, I haven't tested it yet though. Doc says password will be ignored when pat is given so I assumed we still needed the username.

@allburov
Copy link
Member

I've get feedback about TFS 2018 to email. Sometimes we have to change api_version explicitly. But TFSAPI doesn't accept api version.

I currently construct an TFSAPI object first, and then access its rest_client to set its api_version field
I get an error updating a work item on our TFS 2018 server if I do not specify the api_version beforehand

Work around:

session = tfs.TFSAPI("https://dev.azure.com/xyz", project='scrum', pat=token)
session.rest_client.api_version = 4.0

@allburov allburov changed the title About Supporting TFS2018 Support TFS2018 Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted waiting for feedback Feedback from reporter is required. Issue will be closed otherwise.
Development

No branches or pull requests

3 participants