I’m working on Azure pipelines that connects to my Windows Self-Hosted agent.
I understood I can access the projects I have stored on an intranet TFS 2018 server but I keep having “Authentication failed” errors.
Does it depend on the project type in TFS ?
I never used Git before to connect to my project in VS 2019.
On the machine, under the same account, where I work on this project with VS2019, I tried those commands:
git clone https://tfs.myCie.com/DefaultCollection/myProject/
> Result: Cloning into ' myProject '...
> fatal: repository 'https://tfs.myCie.com/DefaultCollection/myProject/' not found
git clone https://user:<PAT>@tfs.myCie.com/DefaultCollection/myProject/
> Result: Cloning into ' myProject '...
> fatal: Authentication failed for 'https://user:<PAT>@tfs.myCie.com/DefaultCollection/myProject/'
I’m currently part of the groups: “Contributors
” and “Project Administrators
” in this TFS project.
I am wondering where the problem is, can it be a git proxy error ?
Can it be a TFS access rights error ?
Can it be a project type problem, maybe some projects in TFS can’t be accessed from Git ?
Does it requires that Basic authentication is enabled on the server ?
UPDATE 1
On first attempts to create a pipeline that get the sources on a on-prem TFS instance, it wasn't working, I suspect because git, on the agent is configured to use a proxy and that proxy doesn't allow connecting to internal TFS server.
I wanted to work around that and create a pipeline that doesn't get sources but runs a script to clone the repo on the agent and then build it:
As the script in the pipeline wasn't working, I tried it in a command prompt on my pc where VS2019 does connect to the "repo".
You probably have a point saying it doesn't look like a repo, I never worked with Git, I used to open Visual Studio, open the Team Explorer, select my project and do my check-outs, check-ins.
It is only today that I notice Team Explorer shows the name: Azure DevOps Server but I know behind is TFS 2018 server:
I understood I can use Git to clone the "repo" from my TFS server but maybe that situation is not covered, that's why I was asking several questions... as I am not even sure what I want to do is possible, you asked what is the clone repo URI I get but I can't find a clone repo URI :(
On a more general way, I was asked to create Azure DevOps Pipelines for all of our projects, it all must run on a Windows Self-Hosted agent, we have projects on GitHub, on Azure Repos and on this on'prem TFS server. I have pipelines for the first two but I can't make this connection to TFS work.
Update 2
Thank you for your directions, it seems I don't have the same UI as you are showing, or I didn't find it but I did look for it...
Here is what I see when I open the project in TFS:
https://user:<PAT>@tfs.myCie.com/DefaultCollection/myProject/
does not look like a Git repo URI. When you go to the repo, what is the clone URI? – Daniel Mann