Recently GitHub changed the default branch name from master to main. You can find more about it here.

This breaks the out of the box experience with Spring Cloud Config and it should be considered to change the default name. To minimize the impact on current users, this change should be clearly documented. Maybe there should be a friendly error message when it cannot find the default branch. A default branch name property on the server side could also be useful.

Comment From: spencergibb

It would be a breaking change. We could make it configurable in Hoxton, but keep master as the default and change the default in ilford.

Comment From: spencergibb

Note: we don't support github directly, just indirectly throuh git.

Comment From: ryanjbaxter

@spencergibb maybe we could look into trying both in hoxton, try master, then try main?

Comment From: spencergibb

I'd consider trying a second label as a separate enhancement but it makes sense

Comment From: AhmedBenyahia

I also have hit this issue recently and it's annoying, I lost a lot of time trying to figure out the problem. as @eduanb sad a friendly error message will be helpful or maybe a parameter in application property to override the default behavior

Comment From: spencergibb

Since we missed being able to make a breaking change, lets go with ryan's suggestion of trying a second label if the first causes an exception, in this case main.

Comment From: spencergibb

The work around is to either change the default branch to master or set spring.cloud.config.label=main in the client. https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_locating_remote_configuration_resources