git-repository
A reference page for the git-clone resource
git-clone in version 0.12 and below of the Codify core pluginThe Git repository 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
parentDirectoryparameter 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:
repofor/path/to/repo.git).
Example usage:
[
{
"type": "git-repository",
"parentDirectory": "~/projects",
"remote": "git@github.com:kevinwang5658/codify-plugin-lib.git"
},
{
"type": "git-repository",
"directory": "~/projects/npm",
"repository": "https://github.com/npm/npm.git"
}
]Setting up Github ssh and clone a repo
Starter instructions for setting up Github SSH and cloning a repo.
ssh-keygen -t ed25519 -C "your_email@example.com"
eval "$(ssh-agent -s)"touch ~/.ssh/config~/.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.Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519ssh-add --apple-use-keychain ~/.ssh/id_ed25519pbcopy < ~/.ssh/id_ed25519.pubSettings > SSH and GPG keys > New SSH Key.
More detailed instructions can be found on githubcodify.json file and use codify apply to clone the repo.[
{
"type": "git-repository",
"parentDirectory": "~/projects",
"remote": "git@github.com:kevinwang5658/codify-plugin-lib.git"
}
]