Create a cocoapods nexus repository - cocoapods

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

Related

Receiving 404 for maven-metadata.xml from Artifactory remote repo of repo.grails.org

I am trying to setup the https://repo.grails.org/core repository as a remote repository on my artifactory instance. If I use that URL directly in the configuration, I can pull everything except the maven-metadata.xml. Maven will throw an error saying it got a 404 for it, and I can verify that by trying to manually pull it through my remote repo.
I have also tried setting up the remote as a smart remote, entering just https://repo.grails.org/artifactory. It will recognize it as an artifactory server, but if I hit Test I get a 500 error. Saving the settings the repo shows no artifacts.
I have also tried https://repo.grails.org/artifactory/core, /artifactory/api/core, /artifactory/api/maven/core, /grails/core as well as a few others and those that work for retrieving jar or pom files still give a 404 for the maven-metadata.xml.
What is the correct way to configure the repo.grails.org repo as a remote repository?
I have tried this is both the 7.29 and 7.3 versions of artifactory with the same result.
From our previous experience, it was understood that grails repository core that you are pointing to is a virtual repository. grails admins might have added all the remote and local repositories under this. But artifactory does not support virtual repositories for smart remote repositories. You may need to point to the correct path.
You may try to point to https://repo.grails.org/core and then can you share the full path of the file that you are trying to download and facing the issues right now.

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

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

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.

Why do I get a 400 when attempting to use publish-plugin from the Grails Release plugin

I'm using Grails 2.4.1 & The Grails Release plugin version 3.0.1.
I have a Sonatype nexus repository (v2.3.1-01) setup that's in use by several other projects with no issues.
I'm attempting to create a new Plugin that I want to distribute through a SNAPSHOT repository in nexus (and later through our Releases repository).
In my ${projectName}GrailsPlugin.groovy file I have:
def groupId ="my-department-grails-plugins"
def version = "0.1-SNAPSHOT"
In my application.properties file I have:
app.name=MyPluginNameForGrails
In my BuildConfig.groovy I have:
grails.project.repos.newsnapshots.url = "http://internal.server.address/nexus/service/local/repositories/snapshots"
grails.project.repos.newsnapshots.username = "username"
grails.project.repos.newsnapshots.password = "password"
I'm trying to kick things off with the following command:
publish-plugin --snapshot --repository=newsnapshots --stacktrace
The build success everything looks good until it trys to push into nexus and I get:
Using configured username and password from
grails.project.repos.newsnapshots ....Error | Failed to publish
plugin: Error deploying artifact
'ald-grails-plugins:my-plugin-name-for-grails:zip': Error deploying
artifact: Failed to transfer file:
http://internal.server.address/nexus/content/groups/public/my-department-grails-plugins/my-plugin-name-for-grails/0.1-SNAPSHOT/my-plugin-name-for-grails-0.1-20140815.191240-1.zip.
Return code is: 400
I've found a related StackOverflow question which seems related but none of the conditions they describe as causing the 400 exist.
I also found the article by Sonatype Nexus which describes possible causes of 400's and those don't seem to be it either.
If you notice the repository that I'm pointing to, it is directly to a repository but then in the error message it lists a path to a group. I am thinking this may be somehow related but but if so... I am not sure how to fix it since this seems to be happening somehow internal to the Releases Plugin.
I should also add that I've removed the -SNAPSHOT from the GrailsPlugin.groovy file and changed the destination repository to be our RELEASES repository with the exact same result.
My problem was due to a mirror defined in my .m2/settings.xml file (thanks Jeff Beck for the comment that led to the resolution!). This was causing the POST to the repository to be redirected to the public GROUP which wasn't allowing the artifact to be uploaded.
There are a few other secondary causes that were contributing to my troubleshooting issues:
While uploading to a SNAPSHOT repository your version number must
be of the pattern x-SNAPSHOT where x can be anything(?).
You cannot upload to a SNAPSHOT repository when using the Nexus ReST
API. This didn't actually end up affecting my specific solution but
it's worth noting for others that may run into this issue.
While uploading to a NON-SNAPSHOT repository your version number must NOT
be of the pattern x-SNAPSHOT.
Given a mirror setting in the .m2 directory the grails release plugin will have issues trying to deploy xif the mirror matches where you are deploying to. You can remove the mirror setting or change it to not match your targeted repo. Check out these jiras for more info:
GPRELEASE-7
GPMAVENPUBLISHER-3

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

Resources