Skip to content
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

Started getting URL using bad/illegal format or missing URL #1811

Closed
KristianBalaj opened this issue Jul 4, 2024 · 1 comment
Closed

Started getting URL using bad/illegal format or missing URL #1811

KristianBalaj opened this issue Jul 4, 2024 · 1 comment

Comments

@KristianBalaj
Copy link

Problem description

I have the following in my workflow to checkout a private repository (using MyOrg/some-repo just as an example):

      - name: Checkout some repository
        uses: actions/checkout@v4
        with:
          repository: MyOrg/some-repo
          path: ${{ env.TESTSUITE_DIR }}
          ref: main
          ssh-key: ${{ secrets.DEPLOY_KEY_SECRET }}

It was working before and suddenly I've started getting the following error:

Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/main*:refs/remotes/origin/main* +refs/tags/main*:refs/tags/main*
  Error: fatal: unable to access 'https://github.com:MyOrg/some-repo.git/': URL using bad/illegal format or missing URL
  The process '/usr/bin/git' failed with exit code 128
  Waiting 20 seconds before trying again

  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/main*:refs/remotes/origin/main* +refs/tags/main*:refs/tags/main*
  Error: fatal: unable to access 'https://github.com:MyOrg/some-repo.git/': URL using bad/illegal format or missing URL
  The process '/usr/bin/git' failed with exit code 128
  Waiting 18 seconds before trying again

  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/main*:refs/remotes/origin/main* +refs/tags/main*:refs/tags/main*
  Error: fatal: unable to access 'https://github.com:MyOrg/some-repo.git/': URL using bad/illegal format or missing URL
  Error: The process '/usr/bin/git' failed with exit code 128

This code was working in an action on 13 May and wasn't working on 12 June.

What I've tried

I've also tried to specify checkout version released before 13 May (i.e. v4.1.5) using the following:

      - name: Checkout some repository
        uses: actions/checkout@v4.1.5
        with:
          repository: MyOrg/some-repo
          path: ${{ env.TESTSUITE_DIR }}
          ref: main
          ssh-key: ${{ secrets.DEPLOY_KEY_SECRET }}

However, it failed with the same problem.

Also, I've tried to change the SSH key without any change.

@KristianBalaj
Copy link
Author

Running rm ~/.gitconfig on the self-hosted machine resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant