Page MenuHomePhabricator

Diffusion: Configure git clone url
Closed, ResolvedPublic

Description

I was able to configure diffusion to host a git repository, thanks to detailed guide.

For a phabricator hosted repository; I get the clone link as follows;

git clone ssh://phabricator.example.com/diffusion/HW/hello-world.git

which does not work, I do get it to work using following clone url;

git clone git@phabricator.example.com:diffusion/HW/hello-world

I would like to publish the same in git clone link on phabricator;

git clone git@phabricator.example.com:diffusion/HW/hello-world.git

# should get cloned to a dir named hello-world

How do I make these changes?

Event Timeline

vnykmshr assigned this task to epriestley.
vnykmshr raised the priority of this task from to Normal.
vnykmshr updated the task description. (Show Details)
vnykmshr added a project: Diffusion.
vnykmshr added a subscriber: vnykmshr.

This should work:

git clone ssh://git@phabricator.example.com/diffusion/HW/hello-world.git

Set diffusion.ssh-user in your config to make "git@" display. See also T4151.

Thanks,

I get the clone link as:

git clone ssh://git@phabricator.example.com/diffusion/HW/hello-world.git

Is ssh:// necessary?

These two patterns are (approximately) equivalent:

ssh://git@phabricator.example.com/diffusion/HW/hello-world.git
      git@phabricator.example.com:diffusion/HW/hello-world.git
                                ^^^
                                 IMPORTANT! "/" becomes ":"!

The former is a normal SSH URI. The latter is an SCP-style SSH URI. We use the former style as canonical because it's easier to parse and the SCP-style URIs cause a lot of confusion, particularly around the need to replace "/" with ":".

There's no way to switch the display to SCP-style URIs. You can use them if you want and they'll work fine (internally, Git will connect to the same resource in the same way), we'll just never show them preferentially in the UI.

Thanks for clearing it out. Clone worked for me either way. We will follow the normal SSH URI.

vnykmshr renamed this task from Mr to Diffusion: Configure git clone url.Mar 14 2014, 8:55 PM