https://github.com/foriequal0/git-sshkey
git with ssh-key
https://github.com/foriequal0/git-sshkey
Last synced: about 2 months ago
JSON representation
git with ssh-key
- Host: GitHub
- URL: https://github.com/foriequal0/git-sshkey
- Owner: foriequal0
- Created: 2015-04-20T03:38:45.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-21T09:05:01.000Z (about 10 years ago)
- Last Synced: 2023-08-04T07:25:29.748Z (almost 2 years ago)
- Language: Shell
- Size: 133 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
git-sshkey
==========Handy addon to handle per-repository ssh-key.
## How to use
Download script
```
wget https://raw.githubusercontent.com/foriequal0/git-sshkey/master/git-sshkey.sh -O ~/bin/git-sshkey
chmod +x ~/bin/git-sshkey
```Create your ssh key to .git/somewhere/
```
ssh-keygen -t rsa -f .git/somewhere/id_rsa_my_per_repository_key
```Set per-repository ssh key
```
git config user.pkey "somewhere/id_rsa_my_per_repository_key"
```Set origin to ssh url
```
git remote set-url ssh://[email protected]:account/my-proj.git
```Use
```
git sshkey push
git sshkey pull
```## Disclaimer
Tested with git 1.7.1, CentOS 6.6