Enhancement: use local git user for stub runner by default
I want to run my stubs that are stored in Git without having to provide git username and password. The stub runner must be able to just use my local git account, that I am using with Git CLI.
version 2.1.2.RELEASE, maven runner
I'm sorry but can you create the issue properly from the beginning until the end? I have no idea what the problem is, for which version, what you did and what you're planning to do.
updated
What did you update? This issue?
Can you please read the comment we're providing for better issue creation when you click on the New issue? I'll paste it for your convinience
<!--
Thanks for raising a Spring Cloud issue. What sort of issue are you raising?
Question
Please ask questions about how to use something, or to understand why something isn't
working as you expect it to, on Stack Overflow using the spring-cloud tag.
Bug report
Please provide details of the problem, including the version of Spring Cloud that you
are using. If possible, please provide a test case or sample application that reproduces
the problem. This makes it much easier for us to diagnose the problem and to verify that
we have fixed it.
Enhancement
Please start by describing the problem that you are trying to solve. There may already
be a solution, or there may be a way to solve it that you hadn't considered.
-->
Also please read on how to ask a good question on SO (it can give you pointers to how ask good questions on GitHub too) - https://stackoverflow.com/help/how-to-ask
I meant that I'd edited the description, i.e. the first comment. I don't really know what to add, don't have time to set up a whole project but basically, when using any stub runner and specifying contractsRepositoryUrl property as a Git repository (starts from git://...) then it requires me to also provide contractsRepositoryUsername and contractsRepositoryPassword (given my repository is private) because authentication fails without these.
The suggestion is to use local Git user credentials by default. Here is my reasoning: I am writing code on my machine, so when I run my tests, I don't want to explicitly supply credentials to a git repository I already have access to using my CLI or IDE. Just like my IDE, I want this tool to recognize my local git user and use that. For CI it would be fine, but again, the CI could also use a git user.
Hopefully, that's clear enough.
Found #1205 and your response actually solves my problem! If I execute these 2 lines then I don't need to provide username and password, which is exactly what my concern was. https://github.com/spring-cloud/spring-cloud-contract/issues/1205#issuecomment-528431188
I suggest updating the documentation. Otherwise, the issue may be closed
Great, are you willing to do a PR? :) That would be a nice contribution (over here I guess https://github.com/spring-cloud/spring-cloud-contract/blob/master/docs/src/main/asciidoc/howto.adoc#how-can-i-use-git-as-the-storage-for-contracts-and-stubs)