t29*_*ato 6 git visual-studio-code
(local) $ git config --global user.email "you@example.com"
(local) $ git config --global user.name "Your Name"
Run Code Online (Sandbox Code Playgroud)
Remote-Container:重建容器
git 提交
(Remote-Container) $ git commit -m hogehoge
Run Code Online (Sandbox Code Playgroud)
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'root@aaaaaaaaaaa.(none)')
Run Code Online (Sandbox Code Playgroud)
https://code.visualstudio.com/docs/remote/containers#_sharing-git-credentials-with-your-container
sau*_*edo 11
我遇到了类似的问题,因为我正在git config --global运行postCreateCommand。我想更改容器中的差异和合并工具。但是,我的用户名和密码从我的.gitconfig. 我还不明白原因,但我通过添加命令来解决这个问题postAttachCommand。
因此,在.devcontainer/devcontainer.json, 而不是:
{
...
postCreateCommand": "git config --global diff.tool ...",
...
}
Run Code Online (Sandbox Code Playgroud)
我用:
{
...
postAttachCommand": "git config --global diff.tool ...",
...
}
Run Code Online (Sandbox Code Playgroud)
我想知道你的情况是否无关。了解您的.devcontainer/devcontainer.json. 尽管如此,我还是希望这些信息对遇到类似问题的其他用户有用。
| 归档时间: |
|
| 查看次数: |
4952 次 |
| 最近记录: |