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

Unadvertised SHAs don't work for github/bitbucket #675

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

muschellij2
Copy link
Contributor

Fixes #674. I know it's heavy handed in the sense that github/bitbucket git repos are going full depth, but otherwise you can't use SSH with install_git to specific SHAs.

The use case is using SSH keys (as opposed to GITHUB_PAT for a number of reasons) and you want to install specific references of packages for a reproducible environment. git fetch origin SHA won't work for these.

@muschellij2 muschellij2 changed the title Unadvertised SHAs don't work for ggih Unadvertised SHAs don't work for github/bitbucket Dec 2, 2021
@muschellij2
Copy link
Contributor Author

Killing this PR - but may be good to have a warning if "like" a short SHA?

@muschellij2 muschellij2 closed this Dec 2, 2021
@muschellij2 muschellij2 reopened this Dec 14, 2021
@muschellij2
Copy link
Contributor Author

This still does have an issue as the

args = c(
uses archive and this is an issue for bitbucket and github as well.

@gaborcsardi
Copy link
Member

@muschellij2 I am sorry, I forgot, is this still an issue, or using the full sha solves your problems?

@muschellij2
Copy link
Contributor Author

muschellij2 commented Feb 2, 2022 via email

@gaborcsardi
Copy link
Member

You are right that a full clone would save some users, but it would also cause pain to other users, when installing from large repos. Popular packages often have large repos, e.g. ggplot2, etc.

I think if the short sha is not found, then we could include a tip in the error message, suggesting a full sha.

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.

SSH External Git Install with *short* SHA Ref fail
2 participants