Skip to content

Commit 429ba2c

Browse files
Fixing git config for cloning repos in dev containers (#3047)
Co-authored-by: José Simões <[email protected]>
1 parent 538d5bc commit 429ba2c

12 files changed

+25
-24
lines changed

.devcontainer/All/Dockerfile.All

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-all:v2.54
1+
FROM ghcr.io/nanoframework/dev-container-all:v2.55

.devcontainer/All/devcontainer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
"xaver.clang-format"
3737
]
3838
}
39-
}
39+
},
4040
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.All containers
4141
// "postAttachCommand": "/usr/local/git-pull-repos.sh"
4242
// Use 'forwardPorts' to make a list of ports inside the container available locally.
4343
// "forwardPorts": [],
44-
// Use 'postCreateCommand' to run commands after the container is created.
45-
// "postCreateCommand": "terraform --version",
44+
// This is needed to allow cloning repositories like the STM32 hal driver ones
45+
"postCreateCommand": "git config --global safe.directory '*'"
4646
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root.
4747
// ,"remoteUser": "vscode"
4848
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.31
1+
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.32

.devcontainer/AzureRTOS/devcontainer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
"xaver.clang-format"
3737
]
3838
}
39-
}
39+
},
4040
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.All containers
4141
// "postAttachCommand": "/usr/local/git-pull-repos.sh"
4242
// Use 'forwardPorts' to make a list of ports inside the container available locally.
4343
// "forwardPorts": [],
44-
// Use 'postCreateCommand' to run commands after the container is created.
45-
// "postCreateCommand": "terraform --version",
44+
// This is needed to allow cloning repositories like the STM32 hal driver ones
45+
"postCreateCommand": "git config --global safe.directory '*'"
4646
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root.
4747
// ,"remoteUser": "vscode"
4848
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-chibios:v1.32
1+
FROM ghcr.io/nanoframework/dev-container-chibios:v1.33

.devcontainer/ChibiOS/devcontainer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@
3636
"xaver.clang-format"
3737
]
3838
}
39-
}
39+
},
4040
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.All containers
4141
// "postAttachCommand": "/usr/local/git-pull-repos.sh"
4242
// Use 'forwardPorts' to make a list of ports inside the container available locally.
43-
// "forwardPorts": [],
43+
// "forwardPorts": [],
4444
// Use 'postCreateCommand' to run commands after the container is created.
45-
// "postCreateCommand": "terraform --version",
45+
// This is needed to allow cloning repositories like the STM32 hal driver ones
46+
"postCreateCommand": "git config --global safe.directory '*'"
4647
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root.
4748
// ,"remoteUser": "vscode"
4849
}

.devcontainer/ESP32/Dockerfile.ESP32

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-esp32:v2.34
1+
FROM ghcr.io/nanoframework/dev-container-esp32:v2.35

.devcontainer/ESP32/devcontainer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
"xaver.clang-format"
3737
]
3838
}
39-
}
39+
},
4040
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.All containers
4141
// "postAttachCommand": "/usr/local/git-pull-repos.sh"
4242
// Use 'forwardPorts' to make a list of ports inside the container available locally.
4343
// "forwardPorts": [],
44-
// Use 'postCreateCommand' to run commands after the container is created.
45-
// "postCreateCommand": "terraform --version",
44+
// This is needed to allow cloning repositories like the STM32 hal driver ones
45+
"postCreateCommand": "git config --global safe.directory '*'"
4646
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root.
4747
// ,"remoteUser": "vscode"
4848
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v1.04
1+
FROM ghcr.io/nanoframework/dev-container-freertos-nxp:v1.05

.devcontainer/FreeRTOS-NXP/devcontainer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
"xaver.clang-format"
3737
]
3838
}
39-
}
39+
},
4040
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.All containers
4141
// "postAttachCommand": "/usr/local/git-pull-repos.sh"
4242
// Use 'forwardPorts' to make a list of ports inside the container available locally.
4343
// "forwardPorts": [],
44-
// Use 'postCreateCommand' to run commands after the container is created.
45-
// "postCreateCommand": "terraform --version",
44+
// This is needed to allow cloning repositories like the STM32 hal driver ones
45+
"postCreateCommand": "git config --global safe.directory '*'"
4646
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root.
4747
// ,"remoteUser": "vscode"
4848
}

.devcontainer/TI/Dockerfile.TI

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM ghcr.io/nanoframework/dev-container-ti:v1.25
1+
FROM ghcr.io/nanoframework/dev-container-ti:v1.26

.devcontainer/TI/devcontainer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
"xaver.clang-format"
3737
]
3838
}
39-
}
39+
},
4040
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.All containers
4141
// "postAttachCommand": "/usr/local/git-pull-repos.sh"
4242
// Use 'forwardPorts' to make a list of ports inside the container available locally.
4343
// "forwardPorts": [],
44-
// Use 'postCreateCommand' to run commands after the container is created.
45-
// "postCreateCommand": "terraform --version",
44+
// This is needed to allow cloning repositories like the STM32 hal driver ones
45+
"postCreateCommand": "git config --global safe.directory '*'"
4646
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root.
4747
// ,"remoteUser": "vscode"
4848
}

0 commit comments

Comments
 (0)