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

Running flowpipe mod install --git-url-mode ssh fails when trying to use private repos as dependencies #121

Closed
cbruno10 opened this issue Oct 11, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@cbruno10
Copy link
Contributor

cbruno@M1P integration-github % flowpipe mod install --git-url-mode ssh
Error: Bad Request: could not retrieve version data from Git URL github.com/turbot/flowpipe-mod-github - ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
	Bad Request: could not retrieve version data from Git URL github.com/turbot/flowpipe-mod-slack - ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
	2 dependencies failed to install
@cbruno10
Copy link
Contributor Author

cbruno10 commented Nov 6, 2023

My install was failing because I was using RSA keys, which are deprecated for use in GitHub, but still work. After I switched to an ed25519 key, mod install worked with a private repo.

@vhadianto Is there any way to allow this command to work with RSA keys as well, since GitHub still allows use of them?

@vhadianto
Copy link
Contributor

Do you want to try it again @cbruno10 ?

I've done some reading in go-git repo (the third party component that we used) it's similar to this go-git/go-git#516 and also refer to MichaelMure/git-bug#1109

But seems to imply that the underlying component (crypto) is the one that does this.

In an Ubuntu VM I created an RSA key and used the latest flowpipe:

victorhadianto@ubuntuarm:~$ flowpipe mod install --git-url-mode ssh

Installed 1 mod:

local
└── github.com/turbot/flowpipe-mod-github.git@v0.0.1-rc.2

This seems to work.

@vhadianto vhadianto added enhancement New feature or request and removed blocker labels Dec 7, 2023
@vhadianto
Copy link
Contributor

We're dropping the git-url-mode flag but the underlying component that does the Git pull remains the same (go-git).

@vhadianto
Copy link
Contributor

Approached has changed, fall back to SSH if HTTPS fails. Added ability to use GitHub PAT.

Added option to use GitHub Token in this commit: turbot/pipe-fittings@29c6c4c

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

No branches or pull requests

2 participants