當我嘗試提交到 localgit時,它一直要求我設定 a user.mailand user.name,盡管它們在本地和全域都正確設定。
我似乎和這篇文章有同樣的問題。
提出的解決方案(url = "https://[email protected]/git_name"在 中設定.git/config)既不作業也不令人滿意(我想繼續使用 SSH)。
這是一個錯誤嗎?
我在帶有 M1 Pro cpu 的新 Macbook Pro 上運行 git 版本 2.32.1 (Apple Git-133)。
我的 Windows 和 WSL 安裝都沒有這樣的問題。
uj5u.com熱心網友回復:
首先,我提到的解決方案是針對 HTTPS URL,而不是 SSH URL。
意思url = "https://[email protected]/git_name",不是url = "[email protected]/git_name"。
其次,如果你得到一個錯誤,它與 git 遠程URLgit commit無關。origin
檢查配置的內容:
git config -l --show-origin --show-scope
OP Magyar_57在評論中提到:
global file:/Users/me/.gitconfig user.name=myusername global file:/Users/me/.gitconfig [email protected]
那是錯誤:
您需要設定email,而不是mail:
git config --global user.email [email protected]
^^^
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/504073.html
標籤:混帐
