I had a same problem. but I solved it about my case
My case was solved by Primary Repository
I changed my remote repository's group, so Its path was "gitlab.aa.com/aa/myrepo" to "gitlab.aa.com/mygroup/mysubgroup/myrepo"
It wasn't a problem on browser but when I tried Grant access, It's on the error.
I realized it's because redirection!
so I tried change Primary Repository
If you found out The problem is like my case, you should reconnect remote (origin)
You can delete the origin (Photo) and connect by Add Existing Remote menu on right click
and than you can see the path Primary Repository changed
Topic:
Developer Tools & Services
SubTopic:
Xcode Cloud
Tags: