Open Louis9902 opened 8 months ago
Hi @Louis9902
I will fix this in the upcoming release.
Thanks for reporting.
Hi @Louis9902 Can you confirm this is fixed in 2024.1.23?
Hey, this problem seems to be fixed to some extend. The url is now not creating errors anymore, but now the collection name is missing. So when I use the link in the PR Header (!
Should I open a seperate issue?
No i ll fix it in here
@Louis9902 hi this EAP version should have a fix for the title url:
https://plugins.jetbrains.com/plugin/22319-azd/edit/versions/eap 2024.1.29
Also, it contains some major refactoring on how the plugin calculates the organization/collection, project, and repo.
If you can test it on your Azure DevOps Server before I release it to everyone, that would be great.
Thanks a lot.
Okay, I tried it, but I have some more Issues. First I needed to re login because the Account had an URI with undefined scheme
(The relogin worked, but maybe something for the release notes).
The second Problem is a litte more compilcated, because now I can't see my pull requests any more. When I press the View Pull Request
button, I get the following error:
Could not connect to repository https://<tfs-server>/tfs/DefaultCollection with account https://<tfs-server>/seubert HTTP Request Request GET https://<tfs-server>/tfs%2FDefaultCollection%2F_apis%2Fgit%2Frepositories%2FHostingRegistry?includeParent=true&api-version=6.0-preview.1 failed with status code 400 and response body: {"$id":"1","innerException":null,"message":"A project name is required in order to reference a Git repository by name.","typeName":"System.ArgumentException, mscorlib","typeKey":"ArgumentException","errorCode":0,"eventId":0}
The interseting thing is, that this repository (HostingRegistry), is a git submodule in the main repositzory, which I have checked out and opend with Rider. So I think there is something wrong with the origin selection, since I only have the submodule in the drop down list to select from. If you need more information please let me know.
Thanks for the input will fix it today and will update
@Louis9902 When you run git remote -vv on the root project IS the output of this format:
ssh://your-server-url:22/tfs/DefaultCollection/ProjectName/_git/RepoName
#OR
https://your-server-ur/tfs/DefaultCollection/ProjectName/_git/RepoName
?
Also, the same flow worked for you with the previous version, right?
@Jonatha1983 The remote is a ssh
remote. The workflow worked for me in the last version.
But I must note that I also have a strage config, because the submodule it self is configured via https
but since this does not work for me (setup from my company) I have added a uri rewrite to my global git config.
[url "ssh://git@my-server-url"]
insteadOf = "https://my-server-url"
The my-server-url
is only the hostname of the server, no subpath.
@Louis9902 So when you type got remote -vv what is the output format?
@Louis9902 So when you type got remote -vv what is the output format?
It's origin ssh://git@<domain>.de/tfs/DefaultCollection/<project with uri escaped space>/_git/<repo>
Sorry for the number of questions, so the repo is not the sub module right?
correct, the remote of the submodule does look different: origin ssh://git@<domain>.de/tfs/DefaultCollection/_git/<project>
. I think this is because the repo and the project have the same name.
Sorry I lost you.
When you type
git remote --vv
from the cloned submodule root folder
You get the first pattern:
ssh://git@<domain>.de/tfs/DefaultCollection/<project with uri escaped space>/_git/<repo>
or the one in the last post without the repo?
Okay sorry for the confusion:
origin ssh://git@<domain>.de/tfs/DefaultCollection/<project with uri escaped space>/_git/<repo>
origin ssh://git@<domain>.de/tfs/DefaultCollection/_git/<project>
- project (default) -> ssh://git@<domain>.de/tfs/DefaultCollection/<project with uri escaped space>/_git/<repo>
\ -- libs/submodule -> ssh://git@<domain>.de/tfs/DefaultCollection/_git/<project>
The submodule shows ssh but only because of my config rewrite. The .gitmodules
file in the default repository has an https
address.
@Jonatha1983 Okay I think I figured out what the problem is. We have a Project (the git submodule) where the project is named exactly like the one repository in it. Let's call this project ProjA. So the url for cloning and the browser url looks somewhat like <host>/tfs/DefaultCollection/_git/ProjA
. When we take a lokk at a url from a repository inside another project where the repo and the project are named differently and the project has multiple projects then the url looks like <host>/tfs/DefaultCollection/ProjA/_git/RepoA
.
So here is what I tink happens. Your api url reloution only takes the origin as 'base' url for the api. But the short form where project and repository names are equal is not supported by the api. When I use the short from like https://<host>/tfs/DefaultCollection/_apis/git/repositories/ProjA?includeParent=true&api-version=6.0-preview.1
to make an api request it fails. But when I change the url to https://<host>/tfs/DefaultCollection/ProjA/_apis/git/repositories/ProjA?includeParent=true&api-version=6.0-preview.1
the request completes succesful.
The Rider UI shows me just the first origin because it errors out and nevery tries to resolve the other origins.
Hope this hels.
What is the short form? Any documentation regarding this you can point me to?
Not really, but i can see the same if I create a new project on dev.azure.com
When created with the defaults there is only one repo with the same name as the project. Then the url in the browser is the same short format https://dev.azure.com/<org>/_git/test
, where test
is the repo and project name. The clone url is then https://<org>@dev.azure.com/<org>/test/_git/test
. But aparently somebody at my company used the url from the browser, which seems to also work for cloning etc.
Hello again, I have found another Problem when checking out Reviews, apparently something went wrong when using the URL to our TFS. I removed the URL but the Problem seems to be that there is an unescaped space in the URL. The git origin url has an escaped space at this position, so I dont know how the extension determins the URL.