Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

handle ssh urls that use home relative paths (ie. paths starting with ~) #79

Merged
merged 2 commits into from
Mar 22, 2019
Merged

handle ssh urls that use home relative paths (ie. paths starting with ~) #79

merged 2 commits into from
Mar 22, 2019

Conversation

reednj
Copy link
Contributor

@reednj reednj commented Mar 17, 2016

It's common for us to have scp style remote urls that use the '~' at the start of the path, to indicate the home directory of the user used at the start of the url. The conversion of these scp style urls to ssh:// urls breaks these paths and adds an initial '/' to the deploy_to path, causing git-deploy not to work.

There is no way (that I know of) to preserve these paths when converting to an ssh:// style uri, so we need to detect this situation and 'correct' the url by removing the initial '/'

It's common for us to have scp style remote urls that use the '~' at the start of the path, to indicate the home directory of the user used at the start of the url. The conversion of these scp style urls to ssh:// urls breaks the path and adds an initial '/' to the `deploy_to` path, causing git-deploy not to work.

There is no way (that I know of) to preserve these paths when converting to an ssh:// style uri, so we need to detect this situation and 'correct' the url by removing the initial '/' when getting the path
@koenpunt
Copy link

The ~ is not necessary for scp, because using a relative path means a relative path from the home directory.

So user@host:some/path/to/file is identical to user@host:~/some/path/to/file.

@reednj
Copy link
Contributor Author

reednj commented Mar 19, 2016

Well, the relative style paths don't work either, but that was harder to fix.

The ~ URLs work fine as remotes in all other situations with git, so it seems right that git deploy should handle it as well

@mislav mislav merged commit fe10add into mislav:master Mar 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants