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

Fails to clone private submodules #87

Closed
TiraO opened this issue Oct 14, 2016 · 6 comments
Closed

Fails to clone private submodules #87

TiraO opened this issue Oct 14, 2016 · 6 comments

Comments

@TiraO
Copy link

TiraO commented Oct 14, 2016

It seems that it does not use ssh key to do submodule init. I can clone my repo and its submodules separately (using the same ssh key) and each succeeds, but unless I say { submodules: none } when doing the get on the parent, the parent fails to clone with:

Identity added: /tmp/git-resource-private-key (/tmp/git-resource-private-key)
Cloning into '/tmp/build/get'...
Fetching HEAD
843d29e Rename some concourse stuff
Submodule 'src/main/resources/[redacted]-secrets' (git@[redacted].git) registered for path 'src/main/resources/[redacted]-secrets'
Cloning into '/tmp/build/get/src/main/resources/[redacted]-secrets'...
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@[redacted].git' into submodule path '/tmp/build/get/src/main/resources/[redacted]-secrets' failed
@concourse-bot
Copy link
Collaborator

concourse-bot commented Oct 14, 2016

Hi there!

We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.

The current status is as follows:

This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

@vito
Copy link
Member

vito commented Oct 16, 2016

Does the sub-repo permit that key? One gotcha is with deploy keys, they can only be bound to one repo. You may need to create a CI user that configures the key instead. I'm not sure if there's anything else we can do here; we tried permitting configuration of multiple keys before, but it turned out that git just picked the first one that worked, or something like that.

@TiraO
Copy link
Author

TiraO commented Oct 28, 2016

Yep. I am not using a deploy key, I am using a user key, and the user owns both repos. As I said,

I can clone my repo and its submodules separately (using the same ssh key) and each succeeds, but unless I say { submodules: none } when doing the get on the parent, the parent fails to clone

@vito
Copy link
Member

vito commented Dec 30, 2016

Sorry for the delay on this; by now you may have moved on, but just to sanity check, this could easily be a syntax thing. Make sure the key looks like:

foo: |
  blah blah blah

and not something like:

foo: |-
  blah blah blah

(note the hyphen)

Beyond something like that or a paste error (pasting private keys with vim can go poorly for example) I'm not sure what else would be the issue. We just add the key to the keychain as normal and git clone as normal, so I don't see why it wouldn't work.

@chendrix
Copy link
Contributor

This issue has been open for a while and become stale. I'm going to close it now.

@beeender
Copy link

Actions has the same problem, see the discussion actions/checkout#183

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

5 participants