Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository URL get-urlmatch filter for SSH connections? #307

Open
almereyda opened this issue Dec 7, 2020 · 0 comments
Open

Repository URL get-urlmatch filter for SSH connections? #307

almereyda opened this issue Dec 7, 2020 · 0 comments

Comments

@almereyda
Copy link

Considering a configuration that looks like

$ ll ~/src ~/ssc                        
lrwxrwxrwx 1 yala yala 14 Okt  5 16:51 /home/yala/src -> /srv/idata/src/
lrwxrwxrwx 1 yala yala 39 Dez  7 18:43 /home/yala/ssc -> /srv/idata/Hosts/ganglion/home/yala/ssc/

and

[ghq]
vcs = git
root = ~/src

[ghq "git@github.com"]
vcs = git
root = ~/ssc

it is not possible to use ghq to clone repositories via SSH into ~/ssc (secure source code) for separation of protocol concerns.

$ ghq get git@github.com:almereyda/awesome-starred.git
     clone ssh://git@github.com/almereyda/awesome-starred.git -> /home/yala/src/github.com/almereyda/awesome-starred
       git clone --recursive ssh://git@github.com/almereyda/awesome-starred.git /home/yala/src/github.com/almereyda/awesome-starred
Klone nach '/home/yala/src/github.com/almereyda/awesome-starred' ...
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 87 (delta 6), reused 0 (delta 0), pack-reused 66
Empfange Objekte: 100% (87/87), 785.79 KiB | 358.00 KiB/s, Fertig.
Löse Unterschiede auf: 100% (27/27), Fertig.

$ ghq get git@github.com:almereyda/awesome-starred.git
    exists /srv/idata/src/github.com/almereyda/awesome-starred
$ ghq get -p git@github.com:almereyda/awesome-starred.git
    exists /srv/idata/src/github.com/almereyda/awesome-starred

Also adding the scheme with ssh://git@github.com or even git+ssh://git@github.com each with and without the colon : didn't yield sufficient results.

How can I tell ghq to clone repositories via SSH into a different root directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant