-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AZURE_PORT
and AZURE_VIRTUAL_DIRECTORY
are ignored in the repository URLs
#1034
Comments
The Retry this with ecosystem specific docker images and report back.
Also, it may be easier to try the extension first (it should work with Azure DevOps server) |
Thank you very much for your prompt answer!
Sorry for that. Indeed, I was following an outdated walkthrough article.
I tried with the following Docker images:
but got a similar errors, this time for both
I can see the URL is again missing the port and virtual directory -https://tfs.domain.com/Azure_Org_Name/Azure_Project_Name/_git/Azure_Repo_Name/
+https://tfs.domain.com:8443/tfs/Azure_Org_Name/Azure_Project_Name/_git/Azure_Repo_Name/ Script for reproducing#!/usr/bin/env bash
set -ueo pipefail
set -x
GITHUB_ACCESS_TOKEN='REDACTED'
AZURE_HOSTNAME='tfs.domain.com'
AZURE_PORT='8443'
AZURE_VIRTUAL_DIRECTORY='tfs'
AZURE_ORGANIZATION='Azure_Org_Name'
AZURE_ACCESS_TOKEN='REDACTED'
AZURE_PROJECT='Azure_Project_Name'
AZURE_REPOSITORY='Azure_Repo_Name'
DEPENDABOT_TARGET_BRANCH='main'
DEPENDABOT_AUTHOR_NAME='dependabot'
DEPENDABOT_AUTHOR_EMAIL='[email protected]'
DEPENDABOT_DIRECTORY='/path/to/python/module'
DEPENDABOT_PACKAGE_MANAGER='pip'
DEPENDABOT_OPEN_PULL_REQUESTS_LIMIT=1
DEPENDABOT_LABELS='[]'
DOCKER_IMAGE_TAG="ghcr.io/tinglesoftware/dependabot-updater-$DEPENDABOT_PACKAGE_MANAGER:latest"
docker pull "$DOCKER_IMAGE_TAG"
docker run --rm -i \
--env GITHUB_ACCESS_TOKEN="$GITHUB_ACCESS_TOKEN" \
--env AZURE_HOSTNAME="$AZURE_HOSTNAME" \
--env AZURE_VIRTUAL_DIRECTORY="$AZURE_VIRTUAL_DIRECTORY" \
--env AZURE_PORT="$AZURE_PORT" \
--env AZURE_ORGANIZATION="$AZURE_ORGANIZATION" \
--env AZURE_PROJECT="$AZURE_PROJECT" \
--env AZURE_REPOSITORY="$AZURE_REPOSITORY" \
--env AZURE_ACCESS_TOKEN="$AZURE_ACCESS_TOKEN" \
--env DEPENDABOT_AUTHOR_EMAIL="$DEPENDABOT_AUTHOR_EMAIL" \
--env DEPENDABOT_AUTHOR_NAME="$DEPENDABOT_AUTHOR_NAME" \
--env DEPENDABOT_TARGET_BRANCH="$DEPENDABOT_TARGET_BRANCH" \
--env DEPENDABOT_PACKAGE_MANAGER="$DEPENDABOT_PACKAGE_MANAGER" \
--env DEPENDABOT_DIRECTORY="$DEPENDABOT_DIRECTORY" \
--env DEPENDABOT_OPEN_PULL_REQUESTS_LIMIT="$DEPENDABOT_OPEN_PULL_REQUESTS_LIMIT" \
--env DEPENDABOT_LABELS="$DEPENDABOT_LABELS" \
--env DEPENDABOT_SKIP_PULL_REQUESTS="true" \
"$DOCKER_IMAGE_TAG" \
update_script Full output logs
|
Any update on this ? fatal: repository 'https://tfs.orga.com/Orga/MozOrga/_git/ApiAffaires/' not found The Url should be : |
Describe the bug https://tfs.domain.com:8443/tfs/Azure_Org_Name/Azure_Project_Name/_git/Azure_Repo_Name Instead, when targeting the npm dependencies, the following exception is encountered: Cloning repository into /home/dependabot/dependabot-updater/tmp/Azure_Org_Name/Azure_Project_Name/_git/Azure_Repo_Name /home/dependabot/dependabot-updater/vendor/ruby/3.1.0/bundler/gems/dependabot-core-8919de6bed26/common/lib/dependabot/shared_helpers.rb:345:in run_shell_command': Cloning into '/home/dependabot/dependabot-updater/tmp/Azure_Org_Name/Azure_Project_Name/_git/Azure_Repo_Name'... (Dependabot::SharedHelpers::HelperSubprocessFailed) fatal: unable to access 'https://tfs.domain.com/Azure_Org_Name/Azure_Project_Name/_git/Azure_Repo_Name/': Failed to connect to tfs.domain.com port 443: Connection refused from /home/dependabot/dependabot-updater/vendor/ruby/3.1.0/bundler/gems/dependabot-core-8919de6bed26/common/lib/dependabot/file_fetchers/base.rb:610:in block in _clone_repo_contents'from /home/dependabot/dependabot-updater/vendor/ruby/3.1.0/bundler/gems/dependabot-core-8919de6bed26/common/lib/dependabot/shared_helpers.rb:187:in with_git_configured' from /home/dependabot/dependabot-updater/vendor/ruby/3.1.0/bundler/gems/dependabot-core-8919de6bed26/common/lib/dependabot/file_fetchers/base.rb:591:in _clone_repo_contents'from /home/dependabot/dependabot-updater/vendor/ruby/3.1.0/bundler/gems/dependabot-core-8919de6bed26/common/lib/dependabot/file_fetchers/base.rb:94:in clone_repo_contents' from /home/dependabot/dependabot-updater/vendor/ruby/3.1.0/bundler/gems/dependabot-core-8919de6bed26/npm_and_yarn/lib/dependabot/npm_and_yarn/file_fetcher.rb:41:in clone_repo_contents'from bin/update-script.rb:523:in `' It appears that the repo URL used by the npm_and_yarn module is missing the Azure port (8443) and Azure virtual directory (/tfs) specified in the respective env vars. To confirm this suspicion, I manually corrected the repo URL as follows: -https://tfs.domain.com/Azure_Org_Name/Azure_Project_Name/_git/Azure_Repo_Name/ Also note that the URL is computed correctly when setting DEPENDABOT_PACKAGE_MANAGER='pip'. To Reproduce Set up an Azure DevOps server instance with port 8443 and virtual directory "tfs" set -ueo pipefail DOCKER_IMAGE_TAG='ghcr.io/tinglesoftware/dependabot-updater:latest' docker pull "$DOCKER_IMAGE_TAG" Update pip dependencies: SUCCESSDEPENDABOT_DIRECTORY='/path/to/python/module' Update npm dependencies: FAILSDEPENDABOT_DIRECTORY='/path/to/javascript/module' Screenshots Full logs when running the script above: |
PR fix for this is welcome |
AZURE_PORT
and AZURE_VIRTUAL_DIRECTORY
are ignored for npm
package managerAZURE_PORT
and AZURE_VIRTUAL_DIRECTORY
are ignored in the repository URLs
Quick update to everyone tracking this issue. The areas to look at:
|
I have the same issue as #1141 when trying to use dependabot-core with an on premise Azure DevOps. When dependabot tries to clone the repository, I get I would gladly try to help, but I really dont know where to begin. I have been trying to figure out whats is going on when dependabot performs a clone operation. They have a helper . It ends up creating two files. The first one is a git.config file that looks like: # Generated by dependabot/dependabot-core
[credential]
helper = !/home/acmedev/dev/dependabot-script/vendor/bundle/ruby/3.2.0/gems/dependabot-common-0.280.0/lib/dependabot/../../bin/git-credential-store-immutable --file /home/acmedev/dev/dependabot-script/git.store
[url "https://devops.acme.com/"]
insteadOf = ssh://[email protected]/
insteadOf = ssh://[email protected]:
insteadOf = [email protected]:
insteadOf = [email protected]/
insteadOf = git://devops.acme.com/
[url "https://github.com/"]
insteadOf = ssh://[email protected]/
insteadOf = ssh://[email protected]:
insteadOf = [email protected]:
insteadOf = [email protected]/
insteadOf = git://github.com/ It also creates the /home/acmedev/dev/dependabot-script/git.store referenced on the first file. The contents look like the next two lines, where the tokens have been redacted, but in reality they are there. https://x-access-token:[email protected]
https://x-access-token:[email protected] They configure a I am stuck. If anyone could give me some guidance, I would really appreciate it. |
@MonticolaExplorator there are several known authentication issues when using Task V1; Assuming you are using V1 and it is possible to do so, I'd recommend trying to migrate to Task V2; If you are already using Task V2, please log an issue with a copy of your dependabot and pipeline configuration and logs so we can investigate. |
Describe the bug
I have a repository that uses both
pip
andnpm
to manage the dependencies of the different software modules therein. The repository is hosted on an Azure DevOps configured with a non-default port (8443) and a/tfs
virtual directory, so the repository URL looks like this:When running the
ghcr.io/tinglesoftware/dependabot-updater:latest
docker image to target thepip
dependencies, everything works as expected.Instead, when targeting the
npm
dependencies, the following exception is encountered:It appears that the repo URL used by the
npm_and_yarn
module is missing the Azure port (8443) and Azure virtual directory (/tfs
) specified in the respective env vars. To confirm this suspicion, I manually corrected the repo URL as follows:and then paste the URL into a browser. Indeed, I can confirm that the 1st URL does not work, whereas the 2nd one does.
Also note that the URL is computed correctly when setting
DEPENDABOT_PACKAGE_MANAGER='pip'
.To Reproduce
Steps to reproduce the behavior:
pip
andnpm
dependencies:pip
, but fails fornpm
Expected behavior
The run for the
npm
should correctly build the repo URL based on theAZURE_PORT
andAZURE_VIRTUAL_DIRECTORY
environment variables.Screenshots
Full logs when running the script above:
The text was updated successfully, but these errors were encountered: