https://github.com/solareenlo/private-ssh-clone
プライベートリポジトリをssh経由でcloneする方法
https://github.com/solareenlo/private-ssh-clone
Last synced: 4 months ago
JSON representation
プライベートリポジトリをssh経由でcloneする方法
- Host: GitHub
- URL: https://github.com/solareenlo/private-ssh-clone
- Owner: solareenlo
- Created: 2019-01-29T20:57:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-29T21:25:08.000Z (over 6 years ago)
- Last Synced: 2024-12-30T09:15:32.691Z (5 months ago)
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# private-ssh-clone
プライベートリポジトリをssh経由でcloneする方法### githubへのssh接続を確立する
- ssh鍵を生成
- sshを設定
```
$ vim ~/.ssh/config
--------------------------------
Host github
Hostname github.com
Port 22
User git
IdentityFile ~/.ssh/github_rsa
--------------------------------
$ chmod 0600 ~/.ssh/config
```### GitHubでssh接続を設定する
- GitHubの右上の自分の写真をクリック
- Settingsをクリック
- SSH and GPG keysをクリック
- ssh鍵を追加### 自分のPCからGitHubへssh接続してみる
```
$ ssh github
> PTY allocation request failed on channel 0
> Hi solareenlo! You've successfully authenticated, but GitHub does not provide shell access.
> Connection to github.com closed.
```
な感じで返ってきたらOK### Private repositoryをcloneしてみる
```
$ git clone github:solareenlo/private.git
```# Reference
GitHub関係
- https://akiyoko.hatenablog.jp/entry/2014/03/04/072855SSH関係
- https://qiita.com/tag1216/items/5d06bad7468f731f590e
- https://qiita.com/0084ken/items/2e4e9ae44ec5e01328f1
- https://qiita.com/m1220/items/9dc3856bbcf985577023