$ timedatectl Local time: 金 2019-11-15 16:28:34 UTC Universal time: 木 2019-11-14 16:28:34 UTC RTC time: 木 2019-11-14 16:28:34 Time zone: UTC (UTC, +0000) System clock synchronized: yes systemd-timesyncd.service active: yes RTC inlocal TZ: no
ここで確認したいのは
タイムゾーン
RTCへLocal Timeを同期するか
です。
タイムゾーンはUTC、RTCへLocal Timeを同期しない設定となっています。
そのため、次にWindowsを起動した際にはRTCの時刻がズレた状態となります。
タイムゾーンをJSTにする
JSTとは日本時間の事です。
次のコマンドでタイムゾーンを日本時間に変更します。
1
$ timedatectl set-timezone Asia/Tokyo
念の為、設定が変わった事を確認します。
1 2 3 4 5 6 7 8
$ timedatectl Local time: 金 2019-11-15 01:35:59 JST Universal time: 木 2019-11-14 16:35:59 UTC RTC time: 木 2019-11-14 16:35:59 Time zone: Asia/Tokyo (JST, +0900) System clock synchronized: yes systemd-timesyncd.service active: yes RTC inlocal TZ: no
RTCに同期する時刻をLocal Timeにする
次のコマンドでRTCにLocal timeを同期させる設定を行います。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$ timedatectl set-local-rtc true Local time: 金 2019-11-15 01:38:59 JST Universal time: 木 2019-11-14 16:38:59 UTC RTC time: 金 2019-11-15 01:38:59 Time zone: Asia/Tokyo (JST, +0900) System clock synchronized: yes systemd-timesyncd.service active: yes RTC inlocal TZ: yes
Warning: The system is configured to read the RTC time in the local time zone. This mode can not be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'.
# 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 #秘密鍵のパス