windows環境(WSL)メモ
skonishi1125.icon
WSL環境作っとくメモ。
code:usernameとpw
skonishi /
pwは他の環境でよく使うやつ
参考
https://learn.microsoft.com/ja-jp/windows/wsl/setup/environment?source=recommendations
git接続
code:txt
ssh -T git@github.com
ssh-keygen -t rsa
ssh-add ~/.ssh/github
Could not open a connection to your authentication agent.
ssh-agentエラー
https://qiita.com/sshojiro/items/60982f06c1a0ba88c160
code:txt
eval ssh-agent
chmod 600 ~/.ssh/github
ssh-add ~/.ssh/github
githubで.pubの鍵を登録し、ssh -Tで接続できた。
プロジェクトのgit cloneをする
code:txt
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
https://qiita.com/shiro01/items/e886aa1e4beb404f9038
HTTP経由でcloneすると設定が別途必要になる。
usernameとpasswordが尋ねられる
ssh-addしているのなら、ssh経由でcloneすればよい。
code:txt
git@github.com:リポジトリ
docker導入
Docker Desktop WSL 2 バックエンド
https://docs.docker.jp/desktop/windows/wsl.html
事前準備
https://learn.microsoft.com/ja-jp/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
ubuntuを入れることだと思う 済み。
AWS CLI
https://zenn.dev/bluesdd/articles/5e45b45c2afd11
code:txt
# unzipなければ入れておく
sudo apt install unzip
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws --version
direnv
https://abillyz.com/mamezou/studies/198
code:txt
sudo apt install direnv
eval "$(direnv hook bash)"
source ~/.bashrc
作りたい場所で
direnv edit .
hostsの書き換え
https://www.netassist.ne.jp/techblog/13744/
ここが参考になる
書き換えるときはメモ帳を管理者実行してhostsを書き換える。vimだと無理。
よく初期化されるらしいのでこの設定をしておいた。
https://hymd3a.hatenablog.com/entry/2022/06/20/204354
windows環境で作業するときの手順メモ
WSL立ち上げ
ペンギンのやつ
ssh-agent起動
これをしないとgitに繋げない
code:wsl
eval ssh-agent
ssh-add ~/.ssh/github
# 必要ならほかのカギも
こっちで作業することは少ないのでgit fetchで動作確認しておくと良い
docker立ち上げ
コンテナが古いことも多いので、気になるならdocker compose build --no-cacheでビルドからやると良い。
SQLインポート
DBeaverの操作いろいろ