Removing credentials from 'url' for SCM doesn't play well with SSH git repository hosting
See original GitHub issue- I’ve read the CONTRIBUTING guide.
- I’ve specified the Conan version, operating system version and any tool that can be relevant.
- I’ve explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
conan 1.12+, previous used version was 1.11
Once upon a time there was a pull request #4207 that changed URLs like ssh://git@a.b.c.d:port/GROUP/repo.git
to ssh://a.b.c.d:port/GROUP/repo.git
(i.e. without username) for SCM attribute.
Recently I updated to conan 1.18.5 and got a problem.
I’m pulling sources from a GitLab instance via SSH (I can’t change it now to HTTP) and GitLab (I think git hosting services too) doesn’t accept SSH connections without username.
So what options do I have now?
- Every user of package have to execute
git config --global url.ssh://git@a.b.c.d:port.insteadOf ssh://a.b.c.d:port
, i.e. add config to rewrite URL. It doesn’t scale well. - Every package developer must hardcode username ‘git’ in the scm attribute i.e.
"type": "git",
"username": "git",
"url": "auto",
"revision": "auto",
}
It doesn’t scale too and what if someone wants to use HTTPS and his name is not git
?
For me as a user of conan it looks like a regression.
Could you suggest a scalable workaround or fix this issue?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
windows - Remove credentials from Git - Stack Overflow
Click on Windows credentials tab and here you can see your stored github credentials, under "Generic credentials" heading. You can remove those from...
Read more >2.5 Git Basics - Working with Remotes
Managing remote repositories includes knowing how to add remote repositories, remove remotes that are no longer valid, manage various remote branches and define ......
Read more >Private Repositories - Declarative GitOps CD for Kubernetes
SSH Private Key Credential¶ · Navigate to Settings/Repositories. connect repo overview · Click Connect Repo using SSH button, enter the URL and paste...
Read more >TeamForge-Git integration: General usage FAQ
If not, access the URL http(s)://<yourtfinstance>/scm integration ... The Git integration currently allows you to access a Git repository using SSH.
Read more >Troubleshoot SSH issues | Bitbucket Cloud - Atlassian Support
When attempting to clone, push, or pull over SSH with Git, you may receive one of these messages if Bitbucket couldn't authenticate with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, exactly. That is why I’m asking for a suggestion and cannot provide my own solution.
I’ve realized, that git supports two kinds of addresses and preparing a PR to support both.