Cloning from Private Repo (Microsoft Team Foundation Server - TFS)
- Langage dominant
- Go
- Étoiles
- 300
- Forks
- 64
- Merge moyen
- 20 min
- PR mergées (30 j)
- 1
Description
I am having an issue cloning a repo from TFS. When using the `docker run` command I'm faced with the following errors:
### The base of my command:
```bash
docker run -it --rm \
-v /tmp/envbuilder:/workspaces \
-e ENVBUILDER_GIT_URL=https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code \
-e ENVBUILDER_INIT_SCRIPT=bash \
artifactory.example.com/docker-virtual/ghcr.io/coder/envbuilder
```
#### tls: failed to verify certificate: x509: certificate signed by unknown authority
```bash
envbuilder v1.1.0+a3a6a83 - Build development environments from repositories in a container
#1: 📦 Cloning https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code to /workspaces/example-helloworld-app-code...
#1: 👤 Using no authentication!
#1: Parsed Git URL as "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code"
Failed to clone repository: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": Get "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code/info/refs?service=git-upload-pack": tls: failed to verify certificate: x509: certificate signed by unknown authority
Falling back to the default image...
No Dockerfile specified, looking for a devcontainer.json...
Failed to locate devcontainer.json: open /workspaces/example-helloworld-app-code/.devcontainer: no such file or directory
Falling back to the default image...
error: no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": Get "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code/info/refs?service=git-upload-pack": tls: failed to verify certificate: x509: certificate signed by unknown authority: no fallback image has been specified
error: running command "envbuilder": no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": Get "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code/info/refs?service=git-upload-pack": tls: failed to verify certificate: x509: certificate signed by unknown authority: no fallback image has been specified
```
The next step I tried was adding the extra environment variable ENVBUILDER_SSL_CERT_BASE64=ACTUAL_BASE64_CERT
#### authentication required
```bash
envbuilder v1.1.0+a3a6a83 - Build development environments from repositories in a container
#1: 📦 Cloning https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code to /workspaces/example-helloworld-app-code...
#1: 👤 Using no authentication!
#1: Parsed Git URL as "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code"
Failed to clone repository: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required
Falling back to the default image...
No Dockerfile specified, looking for a devcontainer.json...
Failed to locate devcontainer.json: open /workspaces/example-helloworld-app-code/.devcontainer: no such file or directory
Falling back to the default image...
error: no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required: no fallback image has been specified
error: running command "envbuilder": no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required: no fallback image has been specified
```
The next step I tried was adding the extra environment variable ENVBUILDER_GIT_USERNAME=$PAT_TOKEN
#### unexpected client error: unexpected requesting
```bash
envbuilder v1.1.0+a3a6a83 - Build development environments from repositories in a container
#1: 📦 Cloning https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code to /workspaces/example-helloworld-app-code...
#1: 🔒 Using HTTP basic authentication!
#1: Parsed Git URL as "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code"
Failed to clone repository: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": unexpected client error: unexpected requesting "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code/git-upload-pack" status code: 400
Falling back to the default image...
No Dockerfile specified, looking for a devcontainer.json...
Failed to locate devcontainer.json: open /workspaces/example-helloworld-app-code/.devcontainer: no such file or directory
Falling back to the default image...
error: no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": unexpected client error: unexpected requesting "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code/git-upload-pack" status code: 400: no fallback image has been specified
error: running command "envbuilder": no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": unexpected client error: unexpected requesting "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code/git-upload-pack" status code: 400: no fallback image has been specified
```
The next step I tried was adding the extra environment variable ENVBUILDER_GIT_USERNAME=$BASE64_PAT_TOKEN
#### authentication required again
```bash
envbuilder v1.1.0+a3a6a83 - Build development environments from repositories in a container
#1: 📦 Cloning https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code to /workspaces/example-helloworld-app-code...
#1: 🔒 Using HTTP basic authentication!
#1: Parsed Git URL as "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code"
Failed to clone repository: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required
Falling back to the default image...
No Dockerfile specified, looking for a devcontainer.json...
Failed to locate devcontainer.json: open /workspaces/example-helloworld-app-code/.devcontainer: no such file or directory
Falling back to the default image...
error: no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required: no fallback image has been specified
error: running command "envbuilder": no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required: no fallback image has been specified
```
The next step I tried was adding the extra environment variable ENVBUILDER_GIT_USERNAME=my_tfs_username and ENVBUILDER_GIT_PASSWORD=my_tfs_password
#### authentication required again
```bash
envbuilder v1.1.0+a3a6a83 - Build development environments from repositories in a container
#1: 📦 Cloning https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code to /workspaces/example-helloworld-app-code...
#1: 🔒 Using HTTP basic authentication!
#1: Parsed Git URL as "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code"
Failed to clone repository: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required
Falling back to the default image...
No Dockerfile specified, looking for a devcontainer.json...
Failed to locate devcontainer.json: open /workspaces/example-helloworld-app-code/.devcontainer: no such file or directory
Falling back to the default image...
error: no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required: no fallback image has been specified
error: running command "envbuilder": no Dockerfile or devcontainer.json found: clone "https://tfs.example.com/tfs/EXAMPLE_Git_Collection/CloudEngineering/_git/example-helloworld-app-code": authentication required: no fallback image has been specified
```
The next step I tried was adding the extra environment variable ENVBUILDER_GIT_USERNAME=oauth and ENVBUILDER_GIT_PASSWORD=$BASE64_PAT_TOKEN
This produced the authentication required error again
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Aucun fichier source ni test n’est indiqué. Commencez par reproduire le Docker run vers l’URL TFS privée, puis suivez la gestion par Envbuilder de Git clone, TLS certificate et HTTP authentication. Le travail est terminé lorsque les variables d’environnement documentées permettent de cloner correctement le dépôt privé sans erreurs de certificat ni d’authentification.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- docker, git, go
- Domaine
- devops
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100