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

submodule wasn't working #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

submodule wasn't working #2

wants to merge 1 commit into from

Conversation

mhuot
Copy link

@mhuot mhuot commented Jul 30, 2024

I had to add the subdir and redo it with the https because my keys aren't on the repo/org. Here were my various attempts to get the submodule --

> git submodule update --init
> git submodule update --init ansible-opennms
error: pathspec 'ansible-opennms' did not match any file(s) known to git
> git submodule init
ls -l
total 96
-rw-r--r--@ 1 mhuot  staff  35149 Jul 30 11:15 LICENSE
-rw-r--r--@ 1 mhuot  staff    259 Jul 30 11:15 README.md
-rw-r--r--@ 1 mhuot  staff   1704 Jul 30 11:15 onms.pkr.hcl
drwxr-xr-x@ 5 mhuot  staff    160 Jul 30 11:15 scripts
-rw-r--r--@ 1 mhuot  staff    540 Jul 30 11:15 variables.pkr.hcl
> cat .gitmodules
[submodule "ansible-opennms"]
	path = ansible-opennms
	url = [email protected]:opennms-forge/ansible-opennms.git
> git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
> mkdir ansible-opennms
> git submodule update --init ansible-opennms
error: pathspec 'ansible-opennms' did not match any file(s) known to git
> git submodule update --init
> ls -l ansible-opennms
total 0
>

Here is the error when using SSH --

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:opennms-forge/ansible-opennms.git' into submodule path '/Users/mhuot/packer-ami-opennms/ansible-opennms' failed

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

Successfully merging this pull request may close these issues.

1 participant