Method "getHttpUrl" return wrong url for urls with ssh protocol with port #28691
-
What would you like help with?I think I found a bug How are you running Renovate?Self-hosted If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.GitLab Please tell us more about your question or problemIn our setup we have private composer repositories an url with protocol ssh and define an non default port. Example: The method Source code: Lines 14 to 16 in 376a2a5 In my local test the following line fixed the problem: const protocol = (0, regex_1.regEx)(/^https?$/).exec(parsedUrl.protocol)
? parsedUrl.protocol
: 'https';
parsedUrl.user = '';
parsedUrl.token = token ?? '';
+ parsedUrl.port = ''; This is the very simple solution. Maybe the port can be configured via host rule. Logs (if relevant)Logs
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It maybe makes sense to always strip the port from the transformed https url if the original was ssh? We know it won't be the same, so we may as well strip it? |
Beta Was this translation helpful? Give feedback.
#28722