Malformed module path .. invalid char ':'


(Allan Tony Selvan) #1

Hi All,

I am trying to import a module in my code from our companies git repo. https://bitbucket.mycompany:7999/project/repo but I end up with the below error. What is the right way to import this?

package bitbucket.mycompany:7999/project/repo: unknown import path “bitbucket.mycompany:7999/project/repo”: malformed module path “bitbucket.mycompany:7999/project/repo”: invalid char ‘:’


(Norbert Melzer) #2

You need to change your local ~/.gitconfig to rewrite URL, we did something similar to be able to clone via SSH instead of HTTP, to be able to authenticate using SSH keys…

[url "git@repo.example.com:"]
  insteadOf = http://repo.example.com/

This was our block.

You probably need to do it like this:

[url "http://bitbucket.mycompany:7999"]
  insteadOf = http://bitbucket.mycompany/

And then just leave off the port number in the imports.


(Allan Tony Selvan) #3

@NobbZ Thanks much for your input. I am gonna try this and come back :slight_smile: