foundry: Forge install errors on git ssh urls
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.1.0 (1e1583b 2022-03-13T00:03:29.280028909+00:00)
What command(s) is the bug in?
forge install
Operating System
Linux
Describe the bug
This is a minor issue as users can install via Username/Repository fine. This is to support Ctrl + C, Ctrl + V of the repo install URL as a valid source for forge install. This could be seen as a good first issue, minor polishing task.
Here is an example install via ssh-git url that fails:
oliver ~> forge install git@github.com:Rari-Capital/solmate.git
Installing git in "/home/oliver/ghq/github.com/OliverNChalk/custody-vault/lib/git", (url: https://github.com/git, tag: Some("github.com:Rari-Capital/solmate.git"))
Error:
0: No such file or directory (os error 2)
Location:
cli/src/cmd/install.rs:157
Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (19 by maintainers)
We should support it, but would generally suggest not using SSH URLs for submodules since not everyone is using SSH with git and the modules would fail to pull
Using that action lets you use ssh like a normal user, you could setup your env that way. It uses your github account’s public key to auth, so you could access any repo you have access to using your github token
GitHub only recognizes the
gituser otherwise from actions workflow. you could maybe do something like this where your setting the git submodules remote’s to use your github token to auththen if needed you can replace the normal submodule remotes with the token-based one. here is an example replacing http with https
Open a new issue as this is closed
Having https over ssh is quite annoying(when working with private repos), any chance we could add a flag to allow ssh over https?