Using this solution as a starting point, I discovered that you can use devtools
with a Stash ssh url:
devtools::install_git("ssh://git@stash.yourdomain.com:1234/project/repo.git")
That will install from the latest commit on the master
branch. You can also install a specific branch:
devtools::install_git("ssh://git@stash.yourdomain.com:1234/project/repo.git", branch="develop")
or tag:
devtools::install_git("ssh://git@stash.yourdomain.com:1234/project/repo.git", branch="v1.0")
(note you don't need the tags/
prefix when using a tag)
This will only work if you have SSH keys for your machine on your Stash account. Using the http clone url will not work, because you can't authenticate properly.