https://github.com/hdaojin/git-init
A script for git initialization. Suports Windows, Linux, macOS.
https://github.com/hdaojin/git-init
git python script ssh
Last synced: 11 months ago
JSON representation
A script for git initialization. Suports Windows, Linux, macOS.
- Host: GitHub
- URL: https://github.com/hdaojin/git-init
- Owner: hdaojin
- License: gpl-3.0
- Created: 2022-10-04T07:41:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-15T07:27:50.000Z (almost 3 years ago)
- Last Synced: 2023-10-13T04:35:41.413Z (over 2 years ago)
- Topics: git, python, script, ssh
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# git-init
A script for git initialization. Supports Windows, Linux, and macOS.
## Function
* Check if the git is installed.
* Check if the ssh package is installed.
* Configure the git user name and email.
* Generate the ssh key if it doesn't exist.
* Set the ssh client config to use the ssh key when connecting to github.com.
* Copy the ssh key to the clipboard in order to add it to the github account in webpage.
* Attempts to ssh to GitHub.
## Usage
1. Download the script from .
2. Run the script.
```bash
python3 git-init.py
```
3. Add the ssh public key content to the github account in webpage.
* The ssh public key content is in the clipboard.
* Login your github account in webpage.
* Click the user icon in the top right corner, and then click "Settings" -> "SSH and GPG keys" -> "New SSH key".
* Write the "Title" and paste the ssh public key content in the "Key" field.
## License
[GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html)