How to use GitHub on a multi-person server without a password

--Environment - Debian GNU/Linux 10 (buster) - git version 2.23.0

Reference: Register Deploy keys in the GitHub repository and access without password | CodeLab

Create a private key and a public key.

If you set a passphrase when creating the key, you will be required to enter the passphrase every time you fetch the repository as well as clone it, so we will not set the passphrase this time. *. Please set and cancel the passphrase at your own risk.

# 1.Create an RSA key pair.
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): <<<< Enter(Where to create the key)
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase): <<<< Enter(Passphrase)
Enter same passphrase again: <<<< Enter(Passphrase)
...abridgement...

# 2.View and copy the public key.
$ cat /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAA...

Register the public key in Deploy keys in the GitHub repository.

  1. Log in to GitHub.
  2. Repository to clone> Settings tab> Deploy key> Add deploy key button
    • image.png
  3. Register the public key that you copied with a title. --Select whether to allow the cloned repository to be updated (pushed) with the Allow write access checkbox --If you make a mistake in the [Allow write access] check box, you cannot change it later. Must be deleted and re-registered --Make read-only: Check OFF

Clone the source on GitHub.

Specify the repository as [email protected]:username/repository.git. If you make a mistake, it will look like fatal: repository'[email protected]/hoge/fuga.git' does not exist.

# 1.Create a directory for the repository clone destination.
$ mkdir git

# 2.Change to the directory you created.
$ cd git/

# 3.Clone the repository.
$ git clone [email protected]:ponta/hoge.git
Cloning into bare repository 'hoge.git'...
...abridgement...

Recommended Posts

How to use GitHub on a multi-person server without a password
A memorandum on how to use keras.preprocessing.image in Keras
How to run Django on IIS on a Windows server
How to use Fujifilm X-T3 as a webcam on Ubuntu 20.04
How to use Dataiku on Windows
Notes on how to use pywinauto
Notes on how to use featuretools
How to use homebrew on Debian
Notes on how to use doctest
A note on how to check the connection to the license server port
How to continue processing after returning a response on aiohttp Server
How to create a clone from Github
How to use mecab, neologd-ipadic on colab
How to use Google Assistant on Windows 10
Memorandum on how to use gremlin python
How to test on a Django-authenticated page
Verification of how to periodically execute a script on a Linux server on Windows
[C language] How to use the crypt function on Linux [Password hashing]
Allow sudo to run apt without a password
A simple example of how to use ArgumentParser
How to use Python Kivy ④ ~ Execution on Android ~
How to live a decent life on 2017 Windows
How to set up a local development server
LINUX: How to make arrow keys correspond to 2,4,6,8 on a notebook without a numeric keypad
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
How to use virtualenv
How to use Seaboan
How to use image-match
How to use shogun
How to use Pandas 2
How to use Virtualenv
How to use numpy.vectorize
How to use pytest_report_header
How to use partial
How to use Bio.Phylo
How to use SymPy
How to use x-means
How to use WikiExtractor.py
How to use IPython
How to use virtualenv
How to use Matplotlib
How to use iptables
How to use numpy
How to use TokyoTechFes2015
How to use venv
How to use dictionary {}
How to use Pyenv
How to use list []
How to use python-kabusapi
How to use OptParse
How to use return
How to use dotenv
How to use pyenv-virtualenv
How to use Go.mod
How to use imutils
How to use import
A memo of how to use AIST supercomputer ABCI
[Ansible] How to use SSH password authentication when executing ansible
How to use C216 Audio Controller on Arch Linux