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

fata: repository 'github.com/owner/myrepo' does not exist #165

Open
olvresc opened this issue Mar 13, 2023 · 4 comments
Open

fata: repository 'github.com/owner/myrepo' does not exist #165

olvresc opened this issue Mar 13, 2023 · 4 comments

Comments

@olvresc
Copy link

olvresc commented Mar 13, 2023

Hello, encountering an error when using webfactory/[email protected]

git clone github.com/olvresc/aaa
  shell: /usr/bin/bash -e {0}
  env:
    SSH_AUTH_SOCK: /tmp/ssh-XXXXXXNIEYzk/agent.1584
    SSH_AGENT_PID: 1585
fatal: repository 'github.com/olvresc/aaa' does not exist

Worflow

name: Deploy
    runs-on: ubuntu-22.04
    steps:
      - name: Setup SSH for private repository
        uses: webfactory/[email protected]
        with:
          ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
      - uses: actions/checkout@v3
      - name: Setup Node 16
        uses: actions/setup-node@v3
        with:
          node-version: 16
      - name: Clone test
        run: |
           git clone github.com/olvresc/aaa

Error:

image

image


Added my private key as SSH_PRIVATE_KEY and public key as deploy key with comment [email protected]:olvresc/aaa.git

@olvresc olvresc changed the title fata: repository 'github.com/olvrec/myrepo' does not exist fata: repository 'github.com/owner/myrepo' does not exist Mar 13, 2023
@mpdude
Copy link
Member

mpdude commented Mar 13, 2023

At first sight, configuration looks ok.

Could you try git clone [email protected]:olvresc/aaa.git as the URL please?

@olvresc
Copy link
Author

olvresc commented Mar 13, 2023

At first sight, configuration looks ok.

Could you try git clone [email protected]:olvresc/aaa.git as the URL please?

Hi, was able to clone the repository (on my machine)

$ git clone [email protected]:olvresc/aaa.git
Cloning into 'aaa'...
remote: Enumerating objects: 351, done.
remote: Counting objects: 100% (351/351), done.
remote: Compressing objects: 100% (254/254), done.
remote: Total 351 (delta 171), reused 268 (delta 88), pack-reused 0 eceiving objects:  59% (208/351)
Receiving objects: 100% (351/351), 91.40 KiB | 207.00 KiB/s, done.
Resolving deltas: 100% (171/171), done.

@OscarVanL
Copy link

OscarVanL commented Aug 9, 2023

I have the same issue.

I am using this action to use a deploy key to pull a private submodule.

When I use this action:

      - uses: webfactory/[email protected]
         with:
           ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY}}
      - uses: actions/checkout@v3
         with:
           submodules: true

I get the following output from my checkout step:

Fetching submodules
  /usr/bin/git submodule sync
  /usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1
  Submodule 'bar' ([email protected]:foo/bar.git) registered for path 'src/bar'
  Cloning into '/opt/actions-runner/_work/baz/baz/src/bar'...
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/foo/bar.git/' not found
  Error: fatal: clone of '[email protected]:foo/bar.git' into submodule path '/opt/actions-runner/_work/baz/baz/src/bar' failed
  Failed to clone 'src/baz'. Retry scheduled
  Cloning into '/opt/actions-runner/_work/baz/baz/src/bar'...
  remote: Repository not found.
  Error: fatal: repository 'https://github.com/foo/bar.git/' not found
  Error: fatal: clone of '[email protected]:foo/bar.git' into submodule path '/opt/actions-runner/_work/baz/baz/src/bar' failed
  Failed to clone 'src/bar' a second time, aborting
  Error: The process '/usr/bin/git' failed with exit code 1

However when I use a fork of this project that has been extended to add repo-mappings, it works without any further alterations:

      - uses: shaunco/ssh-agent@git-repo-mapping
         with:
           ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY }}
           repo-mappings: github.com/foo/bar
      - uses: actions/checkout@v3
         with:
           submodules: true

This makes me believe that there is nothing wrong with my SSH deploy key and instead there is a bug in this project.

I read the main README and it sounds like I should not experience any issues as this is the only SSH private key I install, and I only pull one submodule.

@OscarVanL
Copy link

OscarVanL commented Jan 5, 2024

Nevermind, I spoke to soon. After merging and the CI running a few more times the issue still happens, it just appears to not happen all the time.

This problem no longer happens for me with the latest ssh-agent.

The only thing that has changed is that I'm now using actions/checkout@v4 instead of v3:

      - uses: actions/checkout@v4
        with:
          submodules: true

My config now looks like:

      - uses: webfactory/[email protected]
         with:
           ssh-private-key: ${{ secrets.SSH_DEPLOY_KEY }}
           repo-mappings: github.com/foo/bar
      - uses: actions/checkout@v4
         with:
           submodules: true

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

3 participants