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

Failed to install 'unknown package' from Bitbucket #703

Closed
harell opened this issue Apr 1, 2022 · 5 comments
Closed

Failed to install 'unknown package' from Bitbucket #703

harell opened this issue Apr 1, 2022 · 5 comments

Comments

@harell
Copy link

harell commented Apr 1, 2022

This issue is related to a closed issue mentioned here

@jimhester this is still an open issue on R4.1.3 remotes v2.4.2. Could you please advise?

I'm trying to install a package on a public Bitbucket repo. This gives the following error

install_bitbucket('annalectnz/rianna')
> Error: Failed to install 'unknown package' from Bitbucket:
  cannot open URL 'https://api.bitbucket.org/2.0/repositories/annalectnz/rianna/src/HEAD/DESCRIPTION'

However, when I paste the URL address to Chrome, I can see the DESCRIPTION file content

@lancefrench
Copy link

lancefrench commented Apr 14, 2022

Seems highly likely that this is related to the deprecation of Atlassian account passwords for Basic Authentication with the Bitbucket API or Git over HTTPS that went into effect March 1st. Have you re-tested using an app password?

@harell
Copy link
Author

harell commented Apr 14, 2022

I see. If the repo is public (as is the aforementioned repo), do you still expect this error?

@lancefrench
Copy link

lancefrench commented Apr 14, 2022

Technically, no, I would not expect the change to basic auth to affect cloning of repositories marked publicly accessible. (I should read more carefully!) Seems like the actual function should be passing NULL for basic_auth when downloading.

I might try just issuing a download() or file.download() directly against https://api.bitbucket.org/2.0/repositories/annalectnz/rianna/src/HEAD/DESCRIPTION and seeing if that is successful. Even a straight up curl from the command line would be a good proxy for what is happening under the hood.

@harell
Copy link
Author

harell commented Apr 14, 2022

The following code successfully installs the package:

remotes::install_git("https://api.bitbucket.org/2.0/repositories/annalectnz/rianna")

@gaborcsardi
Copy link
Member

install_bitbucket('annalectnz/rianna')

works for me now, but please reopen this issue if you still have problems.

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

No branches or pull requests

3 participants