Closed norcalli closed 6 years ago
Acknowledged. Not yet implemented.
@norcalli How am I suppose to clone from kiani.io/repos/autojump? Where's the repository? Can you show me how you use git to download your repository?
Ah, ok. I thought it would be an extension of being able to clone from gitlab.com
which would support all custom domain names, but I'm guessing that might be special cased?
Essentially I'm using ssh
to interface with a repo on my personal server where a bare git repository is set up to receive a copy, so a private mirror of my projects.
I also tried using ssh
style syntax for the url and that didn't work, so if you want to avoid having to parse like that, an alternative could be using the ashkan@kiani.io:repos/autojump.git
syntax, where if it has an @
it should be interpreted as a git
url.
Currently if I attempt fisher add ashkan@kiani.io:repos/autojump.git
then I get
...
cannot install github.com/ashkan -- are you offline?
...
@norcalli What I mean, without telling me your password, what are the exact commands you type in the command line to clone your repository? Ignore fisher for a second.
@norcalli GitHub.com, GitLab.com, and BitBucket.org are supported.
For completeness, I would run
git clone ashkan@kiani.io:repos/autojump.git
However, since my username on my remote machine and my local are both ashkan
, I originally just did
git clone kiani.io:repos/autojump.git
And the repos
is just a directory I created in the remote machine with the command
ssh kiani.io "sh -c 'mkdir repos/autojump.git && cd repos/autojump.git && git init --bare'"
@norcalli I have a few questions, sorry for your trouble.
Do you also always type in your password or is that information already locally stored in your machine so that when you use git no password prompt is shown?
Also, thank you for creating a user for me in your server so that I can test this feature. So, I was able to log in and create a repo, but I couldn't clone because I didn't have a password. What am I missing?
@jorgebucaran I've made an example for you. I saw the repo you made, and the mistake was that it wasn't a bare repository. Therefore, I made an example repository that you can try to clone against using the following command on your local computer:
git clone guest@kiani.io:fisher-test.git
The way that git
works is that when it isn't using HTTP to clone a repository, it uses ssh
behind the scenes, and git
will be default use the credentials you have stored. Therefore, the syntax closely resembles the one you would use for ssh
ing somewhere.
The syntax is as follows: $USERNAME@$SERVER:$REPOSITORY_PATH
. The part after the semicolon :
is the path on the remote server pointing at a repository initialized with the command git init --bare
. The --bare
is important.
And it's no bother. Thank you for taking the time to address this and making fisher. :)
My pleasure. 💯
@norcalli You should be able to install a package hosted in a custom server using a URL like owner@host.xz:path/to/repo
(4d953fa).
Example:
fisher add guest@kiani.io:fish-hello-remote
Additionally, the branch syntax is supported if a branch with the specified name exists:
fisher add guest@kiani.io:fish-hello-remote@hotfix
This may need more work, so please try again and let me know how it goes.
So far, so good. I'll let you know if I run into trouble. Thanks!
@norcalli Just a friendly warning that this is going to be reversed soon! Please use a private GitHub/GitLab/BitBucket repo.
I host some repos on my personal server, and the new version of fisher seems to assume that it is a github repository anyway:
Versions: