# Default PATH differs between shells, and is not automatically exported # by klibc dash. Make it consistent. export PATH=/sbin:/usr/sbin:/bin:/usr/bin
# Note that this only becomes /dev on the real filesystem if udev's scripts # are used; which they will be, but it's worth pointing out mount -t devtmpfs -o nosuid,mode=0755 udev /dev mkdir /dev/pts mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts || true mount -t tmpfs -o "noexec,nosuid,size=10%,mode=0755" tmpfs /run mkdir -m 0755 /run/initramfs
# Export the dpkg architecture export DPKG_ARCH= . /conf/arch.conf
# mdadm needs hostname to be set. This has to be done before the udev rules are called! if [ -f "/etc/hostname" ]; then /bin/hostname -F /etc/hostname >/dev/null 2>&1 fi
# Bring in the main config . /conf/initramfs.conf for conf in conf/conf.d/*; do [ -f ${conf} ] && . ${conf} done . /scripts/functions
maybe_break mount log_begin_msg "Mounting root file system" # Always load local and nfs (since these might be needed for /etc or # /usr, irrespective of the boot script used to mount the rootfs). . /scripts/local . /scripts/nfs . /scripts/${BOOT} parse_numeric ${ROOT} maybe_break mountroot mount_top mount_premount mountroot log_end_msg
if read_fstab_entry /usr; then log_begin_msg "Mounting /usr file system" mountfs /usr log_end_msg fi
# Mount cleanup mount_bottom nfs_bottom local_bottom
# Check init is really there if ! validate_init "$init"; then echo"Target filesystem doesn't have requested ${init}." init= for inittest in /sbin/init /etc/init /bin/init /bin/sh; do if validate_init "${inittest}"; then init="$inittest" break fi done fi
# No init on rootmount if ! validate_init "${init}" ; then panic "No init found. Try passing init= bootarg." fi
# Move virtual filesystems over to the real filesystem mount -n -o move /sys ${rootmnt}/sys mount -n -o move /proc ${rootmnt}/proc
# Chain to real filesystem exec run-init ${drop_caps}${rootmnt}${init}"$@"${recovery:+--startup-event=recovery} <${rootmnt}/dev/console >${rootmnt}/dev/console 2>&1 echo"Something went badly wrong in the initramfs." panic "Please file a bug on initramfs-tools."
$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file inwhich to save the key (/root/.ssh/id_rsa): sakkuntyo-mint #鍵の名前です、今回はLinuxMint用に作成したためこの名前 Enter passphrase (empty for no passphrase): #パスワード、無くても良い Enter same passphrase again: #パスワードの再確認 Your identification has been saved in sakkuntyo-mint. Your public key has been saved in sakkuntyo-mint.pub. The key fingerprint is: SHA256:7XG5j/GRtAxIs3/dkUxVIZDrcyG+6g7LVxqvNVK1bEg root@DESKTOP-2QSQU2N The key's randomart image is: +---[RSA 2048]----+ | .o. .=| | . . .| | oE.. . | | o.*+o+ .| | S Bo=+o+ | | o.O.* +o| | . .*oB * o| | . oooo.* . | | o+=o . o | +----[SHA256]-----+
鍵ファイルが出来た事を確認する
1 2
$ ls sakkuntyo-mint sakkuntyo-mint.pub
.pubが付いているのが公開鍵 ついていないのが秘密鍵
GitHubに配置する
github.comのsettingsを開く
「SHS and GPG keys」を開き、公開鍵の名前と公開鍵の内容を登録
Titleは何でも大丈夫
これで公開鍵が登録されました
sshクライアントにgitの設定を追加
~/.ssh/configを編集し、以下の4行を追加
1 2 3 4
Host git hostname github.com user git identityfile ~/.ssh/sakkuntyo-mint #秘密鍵のパス