WSL: Difference between revisions
Jump to navigation
Jump to search
(→git) |
(→git) |
||
| Line 18: | Line 18: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo snap install gh --classic | |||
git config --global credential.guiPrompt true | git config --global credential.guiPrompt true | ||
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe" | git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe" | ||
Revision as of 09:15, 15 September 2026
TODO
git
sudo snap install gh --classic
git config --global credential.guiPrompt true
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"
# 指定用 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