WSL: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== TODO ==
== Setup development environment for WSL ==


<quickmmd name="wsl-todo">
<quickmmd name="wsl-todo">
Line 15: Line 15:
</quickmmd>
</quickmmd>


== git ==
== GitHub Auth in WSL ==


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git config --global credential.guiPrompt true
sudo snap install gh --classic
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"
gh auth login
# 指定用 Windows 的 Chrome 開啟
git config --global credential.msauth.webBrowserPath "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
 
# 或指定用 Windows 的 Edge 開啟
git config --global credential.msauth.webBrowserPath "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
 
# 在 ~/.bashrc 中寫入 GCM_WEB_BROWSER 環境變數
echo 'export GCM_WEB_BROWSER="edge"' >> ~/.bashrc  # 可填 edge, chrome, 或 firefox
source ~/.bashrc
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 09:27, 15 September 2026

Setup development environment for WSL

GitHub Auth in WSL

sudo snap install gh --classic
gh auth login