Skip to content

Request support git "insteadOf" url aliases #1150

@larsks

Description

@larsks

Bug Report

Description

With a configuration like this in my global git config:

[url "ssh://git@github.com/larsks/"]
	insteadof = me:

I can clone a repository like this:

git clone me:myproject

Which ends up looking like this:

$ git config --get remote.origin.url
me:myproject

Which ultimately causes psr to fail like this:

$ psr version
::ERROR:: Bad url: 'me:myproject'

Expected behavior

PSR would not have thrown an error because it would have been able to interpret my git configuration and extracted the remote URL just as git normally can.

If you use git remote get-url <remote> command, it will return a fully expanded url via the insteadOf setting.

$ git remote get-url origin
ssh://git@github.com/larsks/myproject

Actual behavior

PSR errored out with a failure message of a bad remote URL because it retrieved the remote url setting which in raw form is an invalid URL rather than using the git interpreter which supports the insteadOf alias attribute and would of returned a valid remote URL value.

Environment

semantic-release, version 9.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working properly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions