devcontainers / devcontainers/cli

Global gitconfig fails to copy to devcontainer with postCreateCommand

未关闭
#787 4 条评论 0 个 reaction 已指派 1 人 已被 @chrmarti 认领 在 GitHub 查看
bug
主要语言
TypeScript
星标
3k
派生
457
平均合并
13 小时 17 分钟
30 天内合并 PR
6

描述

Related to this issue https://github.com/devcontainers/cli/issues/98 there still seems to be a problem for the global git config.

My local git config is copied, but my global git config is not. Settings that only existed in my global config like my name and email are not copied.

It seems that a default empty global git config is created when using `postCreateCommand`. In my case, I am running a script `"postCreateCommand": "sh ./scripts/env-setup.sh"`

Here is what my containers global git config looks like when using `postCreateCommand`:

```
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
# name =
# email = vscode@b97bec6ca4f1.(none)

```

If I change it to `postAttachCommand`, then an exact copy of my actual global git config file from my machine is copied correctly into the dev container.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。