git-clone
The Git clone resource reference. This resource will allow Codify to clone repos from any git remote (Github, Bitbucket, GitLab, etc…)
Parameters:
-
repository: (string) The repository url. This can be any url supported by git clone (ssh, https, ftp).
-
remote: (string) The remote url. This can be any url supported by git clone (ssh, https, ftp).`(removed in version 0.7.0 use repository instead) -
directory: (string) The directory to git clone into. Note that a nested folder will not be created and files from the root level of the git repository will be copied into the directory. Use the
parentDirectory
parameter instead to specify the parent directory to clone into. Equivalent to using the<directory>
option of git clone. Both relative and absolute paths work. -
parentDirectory: (string) The parent directory to clone into. This option will call git clone within the parent directory and create a folder name using the last part of the git url (ex:
repo
for/path/to/repo.git
).
Example usage:
Setting up Github ssh and clone a repo
Starter instructions for setting up Github SSH and cloning a repo.
- Generate a ssh key and start the ssh-agent.
- Create a ssh config if it doesn’t exist
- Open the
~/.ssh/config
file with your favourite text editor and add the following. If a custom identity file name was used. Substitute~/.ssh/id_ed25519
with your custom name.
- Add ssh key to your keychain
- Copy the ssh public key to your clipboard.
-
Login to your github account online and paste the public key under
Settings > SSH and GPG keys > New SSH Key
. More detailed instructions can be found on github -
For every repo you want to clone get the SSH url under the Code drop down on the home page of a repository
- Copy the url into your
codify.json
file and usecodify apply
to clone the repo.