Forbidden (404?) to download yarn artifact using Artifactory and Github - maven

I have an issue with Jfrog Artifactory and Yarn. I'm not able to download an artifact when I run mvn clean install ...
I have added an artifact yarnpkg-releases inside my Artifactory.
It refers to https://github.com/yarnpkg/yarn/releases/download/.
This URL on its own returns a 404. I don't know if this is a problem?
My maven install tries to download https://my-url/artifactory/yarnpkg-releases/v0.28.4/yarn-v0.28.4.tar.gz and it returns a 404:forbidden. (Yes not 404 not found or 403 forbidden).
In my mindset, this URL will resolve to https://github.com/yarnpkg/yarn/releases/download/v0.28.4/yarn-v0.28.4.tar.gz which returns the right tar.gz.
I have a .yarn file in which I configure the URL to my registry and I ignore SSL. What can cause this issue?
Also with a curl (using user:passwd) I got the same error.
I have the same set up for a node artifact. The node artifact points to this URL
When I try curl -uuser:passwd -O "https://my-url/artifactory/nodejs-dist/v0.1.104/node-v0.1.104.tar.gz" it works so I don't understand why this is not working for my yarn artifact.

I think the issue is with your URL.
Actual artifactory is available in the below location
https://codeload.github.com/yarnpkg/yarn/tar.gz/v0.28.3/yarn-0.28.3.tar.gz

Related

I have a problem with Maven 3.8.4 that not allowed to authorize our private repo on Apache Archiva

I have installed Maven 3.8.4 with homebrew on Macbook M1 CPU recently and I have ~/.m2/settings.xml properly containing the Apache Archiva user name and password.
when I executed mvn help:effective-settings -DshowPasswords=true command I can see the correct xml content. But when I run mvn clean package I get something like that
Failed to read artifact descriptor for company.webshop:webshop-common:jar:21.11.12:
Could not transfer artifact company.webshop:webshop-common:pom:21.11.12
from/to company (https://repo.company.com/repository/internal/):
authorization failed for https://repo.company.com/repository/internal/company/webshop/webshop-
common/21.11.12/webshop-common-21.11.12.pom,
status: 403 Forbidden -> [Help 1]
when I try to access https://repo.company.com/repository/internal/ address from my browser I can login and see the artifacts properly as well. More than that other team members don't live any problem.
I also removed maven and reinstalled but nothing changed.
any idea?
I noticed that after removing the folders (under the .m2 folder) related to our private repo, and re-run the maven after a fresh instalment it's working properly.
Maven was not downloading the artifacts I guess, since there is a folder of that version number and only showing the content of old files which says something like "not authorized to the repo." and was miss leading

Create a cocoapods nexus repository

I have a nexus running (3.21.1). It works fine for most repositories I created. But when I create a cocoapod repo whit this minimal configuration
repo config
It returns an error 404 when I try to access to the repo url (http://localhost:8081/repository/b/)
How do I resolve this?
GET request to the root of the repository should return an error message with an explanation due to a bug, this explanation is no present in the last version. But it works if you don't point to the root of the repo

No versions could be resolved for groupid.artifactid error when using Repository Connector

I want to simply download a war file from a Nexus repo and deploy it on a remote tomcat server.
I found this plugin https://wiki.jenkins.io/display/JENKINS/Repository+Connector+Plugin, which seems to help me do the same.
I have the following configuration:
In hue-central, I have correctly configured the repo url.
If I open <repo url>/com/worksap/company/hue-interface-front in my browser, I can see all the versions along with maven-metadata.xml, which contains all the versions.
Am I missing something?
Try following: Go to Jenkins Administration / System configuration, find the Artifact Resolver section, and check Repo Type of your repository. If it is empty, set it to "default". It was causing the same problem in my case.
Example here.

Maven Github repository + Artifactory

I'm have a artifactory running in a server here, and my settings.xml are configured to use it has a mirror.
But, one dep I use is in a github page, and seems like artifactory doesnt get it, because it throws me "UNABLE TO DOWNLOAD blah..".
I try to add the repo in Artifactory remote repositories, click in test, and it shows me a
Connection failed: Error 403: Forbidden
I am using the correct URL (I think): http://gwtbootstrap.github.com/maven/snapshots
Got any help?
Thanks in advance
I think the URL should be:
https://github.com/gwtbootstrap/maven/tree/gh-pages/snapshots

Service unavailable error while building using Maven

I am a newbie to Maven.
First time I run the mvn clean install command and it gave me the below error:
[ERROR] Non-resolvable parent POM: Could not transfer artifact
com.sybase365.mobiliser:mobiliser-parent:pom:4.6.0-RC02 from/to repo
(http://orinoco.sybase.com/nexus/content/groups/public-devel): Failed
to transfer file:
http://orinoco.sybase.com/nexus/content/groups/public-devel/com/sybase365/mobiliser/mobiliser-parent/4.6.0-RC02/mobiliser-parent-4.6.0-RC02.pom.
Return code is: 503, ReasonPhrase:Service Temporarily Unavailable. and
'parent.relativePath' points at wrong local POM # line 3, column 11 ->
How do I resolve this error?
Your remote repository is inaccessible. See explanation for error 503 in here.
I think i found the reason it gives 503. In my case this was a proxy issues inspite of excluding hosts that belong to a certain domain.
Remove the proxy from manage jenkins -> manage plugin -> advanced and try again
Could be, also I find this error happens all the time when the repo is available and downloading the file manually from the nexus GUI works. For some reason maven looks in the wrong repository location. If it happens for one jar and its pom you can down load the file by hand.
If maven ever hits a temporary HTTP problem it stores a lastUpdated file that you need to delete or it will not try to download the file again for a while.
sudo updatedb && locate lastUpdated | xargs rm
Or scrabble around in explorer in /Users/username/.m2/repository to find the files if you use windoze
Another thing that can mess with repo access is the proxy that maven uses. Check the contents of ~/.m2/settings.xml or create this file and setup what ever HTTP proxies or lack there of that you need to access the repos you have configured in poms.

Resources