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

"401 Unauthorized" when installing #8

Open
flisboac opened this issue Oct 30, 2024 · 0 comments
Open

"401 Unauthorized" when installing #8

flisboac opened this issue Oct 30, 2024 · 0 comments

Comments

@flisboac
Copy link

I can't install ReZipDoc in a repository, because downloading ReZipDoc's JAR file from Sonatype Nexus always fails (unless you "log in", or use an API key to download, or whatever).

$ rezipdoc-repo-tool.sh install --commit --renormalize

rezipdoc-repo-tool.sh action: installing ...
git filter and diff binary - installing ... find: ‘/home/flisboac/bin/../target’: No such file or directory
--2024-10-30 00:46:07--  https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=io.github.hoijui.rezipdoc&a=rezipdoc&v=LATEST
Resolving repository.sonatype.org (repository.sonatype.org)... 52.0.209.102, 52.206.204.164
Connecting to repository.sonatype.org (repository.sonatype.org)|52.0.209.102|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.
 using binary '' ... basename: missing operand
Try 'basename --help' for more information.
basename: missing operand
Try 'basename --help' for more information.
mv: cannot stat '': No such file or directory
failed!
git filter and diff config entry in .git/config - writing ... done
git attributes entries to .git/info/attributes - writing skipped (section already exists)
git merge renormalization - enabling skipped (is already enabled)

To be clear, I followed all the installation steps from the README with:

curl --silent \
          --location \
          https://raw.githubusercontent.com/hoijui/ReZipDoc/master/scripts/rezipdoc-scripts-tool.sh \
      | bash -s install --path

The local Git repository is new, so no history so far. What's failing is just the install command.

In rezipdoc-repo-tool.sh, I see that fetch_url refers to a public Sonatype Nexus' Repository. Any chance a link to maven.org being used instead?

The only problem with that is the fetch URL must indicate the exact version, e.g. latest is currently 0.4, therefore https://repo1.maven.org/maven2/io/github/hoijui/rezipdoc/rezipdoc/0.4/rezipdoc-0.4.jar. Perhaps the latest version could be read somewhere else, prior to downloading the JAR (e.g. a plain text VERSION file in the main branch indicating the latest release version, that could be downloaded and read, and then interpolated into fetch_url in place of LATEST).

Another option would be using mvn (e.g. mvn dependency:get -Dartifact=io.github.hoijui.rezipdoc:rezipdoc:LATEST, but that would require installing maven first.

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

1 participant