Installation
127 |Requirements:
128 |-
129 |
- Git Bash installed on your computer. 130 |
- GitHub personal access token. (Go to your GitHub profile -> Settings -> Developer settings -> Personal Access Tokens -> Create new token with all the repository permissions) 131 |
Note: This script is written exclusively for Git Bash on Windows. You will have to modify it for other shells.
133 |-
134 |
-
135 |
Fork and clone the repository locally.
136 |
137 | -
138 |
Create a
139 |github_secrets.py
file in the./scripts
folder and define the following variables inside it:
141 |GITHUB_API_TOKEN = "Your GitHub personal access token" 140 | USERNAME = "Your GitHub username"
142 | -
143 |
Add the project path to the PATH variable (Recommended):
144 |
145 |$ export PATH=$PATH":"$(pwd)"/scripts"
To permanently add the scripts path to the PATH variable, run the below command in the project's root directory. (This file is located in your home directory)
146 |
147 |$ echo 'export PATH=$PATH''":'"$(pwd)"'/scripts''"' >> ~/.bash_profile
148 | -
149 |
OR
150 |Run the following commands in the project folder to add the scripts to your bin directory:
151 |
152 |$ cp -r /scripts/* /usr/bin/
153 |
How to Use
158 |
159 | create_repo -h
160 |
161 | Sample usage:
162 |
163 | create_repo <PATH_NAME> <REPO_NAME>
164 |
165 | <PATH_NAME> is the path where you want to create the local repository and <REPO_NAME> is the name for your repo
166 |Example:
167 |
168 | create_repo . test-repo
169 |
170 | License
174 |
175 |
176 | MIT License
177 |
178 | Permission is hereby granted, free of charge, to any person obtaining a copy
179 | of this software and associated documentation files (the "Software"), to deal
180 | in the Software without restriction, including without limitation the rights
181 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
182 | copies of the Software, and to permit persons to whom the Software is
183 | furnished to do so, subject to the following conditions:
184 |
185 | The above copyright notice and this permission notice shall be included in all
186 | copies or substantial portions of the Software.
187 |
188 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
189 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
190 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
191 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
192 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
193 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
194 | SOFTWARE.
195 |
196 |
197 |