Simple cli tool to assist in searching and cloning Organizational repositories. This quick tool simply fills a need to be able to quickly search and clone company repositories. Making it so I don't have to leave the shell...
Currently the only authentication method being used is a Git Personal Access token. An access token can be created via Settings / Developer Settings / Personal access tokens.
Save the token in ~/.gittoken and chmod the file 0600.
If you don't want to continually provide --organization "orgname" on the command line create a ~/.git-code.yaml file with the line:
organization: orgnameThe following will show any repositories within the Organization that contains the name "reponame". The "show" command returns data in JSON.
git-code show "reponame"The "clone" command will match repositories that contain the "reponame". If there are multiple repositories that match, the names will be displayed and you will be asked to make the search more specific.
# This will clone the repository into a directory name that matches the repository
# name
git-code clone "reponame"
# This will clone the repository into a directory named "JIRA-2112"
git-code clone "reponame" --directory "JIRA-2112"