Is there a way to automatically replacing ssh instead of https in SwiftPM?

For me, only ssh links worked steadily. The https links were time out many times. So my workaround was to fork all packages and change the https:// to ssh:// dependencies one by one.

Since packages are inter-dependent. The work is easy but not satisfied. So is there a way that I could set in SwiftPM so it could replace all https:// with ssh:// during the preparing process, then I don't have to edit them one by one?

You can set this with a Git config flag

git config --global url.ssh://git@github.com/.insteadOf https://github.com/
3 Likes
Terms of Service

Privacy Policy

Cookie Policy