Open andreagrioni opened 3 years ago
Same issue with me.. When I override with my private bitbucket server, the hardcoding of repositories
within the construction of the url causes this to fail
Also having this issue!
@andreagrioni and/or @aprijol : Have either of you found a good work around for this?
What is the correct URL on a private server?
Our Bitbucket Server can be addressed with the Bitbucket Server REST API, but I am not able to identify the right requests to change the install_bitbucket
function. Happy to assist if possible.
Well, I don't have access to any private BitBucket repos, but if you can create a PR, I'll be happy to review it.
What is the correct URL on a private server?
@gaborcsardi , I'm sorry to say that I'm not sure.. I don't know if this example helps or not:
The remote is this:
https://code.jh.edu/scm/psq/pmaputilities.git
In a browser, I can directly access the repos like this..
https://code.jh.edu/projects/PSQ/repos/pmaputilities/browse
I have an auth token and thought I would be able to install the package like this:
auth_token = <my token>
remotes::install_bitbucket(
repo = "repos/pmapUtilities",
ref="main",
host="code.jh.edu/projects/psq/",
upgrade="never",
auth_token = auth_token
)
output:
Error: Failed to install 'unknown package' from Bitbucket:
cannot open URL 'https://code.jh.edu/projects/psq//repositories/repos/pmapUtilities/src/main/DESCRIPTION'
Traceback:
1. remotes::install_bitbucket(repo = "repos/pmapUtilities", ref = "main",
. host = "code.jh.edu/projects/psq/", upgrade = "never", auth_token = auth_token)
2. install_remotes(remotes, auth_user = auth_user, password = password,
. host = host, dependencies = dependencies, upgrade = upgrade,
. force = force, quiet = quiet, build = build, build_opts = build_opts,
. build_manual = build_manual, build_vignettes = build_vignettes,
. repos = repos, type = type, ...)
3. tryCatch(res[[i]] <- install_remote(remotes[[i]], ...), error = function(e) {
. stop(remote_install_error(remotes[[i]], e))
. })
4. tryCatchList(expr, classes, parentenv, handlers)
5. tryCatchOne(expr, names, parentenv, handlers[[1L]])
6. value[[3L]](cond)
I notice the hard coding of the term "repositories" as also experienced by @andreagrioni . I may be doing a number of other things incorrectly -- any insight you can provide would be much appreciated... or any workaround!
What is the correct URL on a private server?
Private servers can have a number of things in that node. Our organization has the org abbreviation there. I just went in and removed "repositories" from the build_url calls. I added the node I needed to username (e.g., orgabbrev/username). I still had issues further down the line with authentication and ended up having to put this effort on hold. But, just taking out "repositories" worked for this issue.
I also have this problem. Is there any way we can specify the whole URL? This would be a great feature as the current hard coding of "repositories" does not work for me
Any potential workarounds to this? I am having the same issue
You could try the git::
syntax of pak: https://r-lib.github.io/pkgdepends/reference/pkg_refs.html#packages-in-git-repositories-git-
I have a R package on a private BitBucket server.
The cmd
remotes::install_bitbucket(repo="user/repo.git", host="bitbucket.NAME.net/")
exited with error message:Error: Failed to install 'unknown package' from Bitbucket: cannot open URL 'https://bitbucket.NAME.net//repositories/user/repo.git/src/HEAD/DESCRIPTION'
Note that the directory
repositories
is not provided in the arguments but it is hardcoded by theinstall_bitbucket
function.