I want to upload an artifact bundle(jar) to https://oss.sonatype.org via curl command. I am facing issues with URL.
curl -v -u 'username':'password' --upload-file xyz-version-bundle.jar https://oss.sonatype.org/content/repositories/com/abc/xyz/version/
I have tried via above curl command and I have tried many variations in URL but still getting 404 - Repository with ID="com" not found.
Note: The bundle jar file contains all files like pom etc. I am able to upload the same bundle via UI.
This worked for me.
curl -ujorlina2 -u $SONATYPE_USER:$SONATYPE_PASSWORD --request POST -F "file=#xyz-"$VERSION"-bundle.jar" "https://oss.sonatype.org/service/local/staging/bundle_upload"
Here SONATYPE_USER is the username for https://oss.sonatype.org and $SONATYPE_PASSWORD is the password for same.
Related
I am using AEM cloud SDK with archetypeVersion 39 project after running mvn clean install my clientlib folders are not getting updated (issue is with only clientlibs rest are working as expected)and even I observed that the folder which I have added most recently i.e., resources is getting deleted PFB looks like this. I have created project by using the below command : mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=39 -D appTitle="WKND Sites Project" -D appId="wknd" -D groupId="com.adobe.aem.guides" -D artifactId="aem-guides-wknd" -D package="com.adobe.aem.guides.wknd" -D version="0.0.1-SNAPSHOT" -D aemVersion="cloud"
enter image description here
enter image description here
I want to create a Jenkins slave as a docker. so I use this Github link to create a Ubuntu Jenkins slave.
In this Dockerfile there is a section that use curl to get a jar file.
curl --create-dirs -sSLo /usr/share/jenkins/slave.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/4.0/remoting-4.0.jar
When I want to curl a jar file with curl, didn't work but by any browsers, I could download the jar file.
Why curl bash command doesn't work?
Are you using a proxy in your web browser ?, if so, just:
export http_proxy=http://ip:port
export https_proxy=http://ip:port
I have a JSON file which I have in maven artifactory.
I need to put the URL in another web application which would directly point to this JSON file. But then the issue I am facing is, due to the authentication issue, it is not able to read it.
So is it possible to specify the credentials directly in the URL so that we can avoid the authentication issue and the other web application could read the JSON file directly.
The web application needs the URL which would return a JSON file.
I'm not a Maven expert, but you can add the credentials in the URL. In the sample below I've used curl to show how that would work.
For example, this curl command would upload a file (download would work the same, just without the -T <MyFileName>)
curl -uadmin:<PASSWORD> -T <MyFileName> "http://jfrog.local/artifactory/generic-local/bla"
If I want to add the credentials into the URL I'd end up with
curl -T <MyFileName> "http://admin:<PASSWORD>#jfrog.local/artifactory/generic-local/bla"
Both curl commands do the the same, the difference is where I have the credentials.
Referring the guide below, I'm trying to upload library files to a maven repository on Artifactory; however, I'm having an error.
https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-DeployArtifactsfromArchive
We've installed Artifactory on premise Linux server, and created a maven repository to store libraries for Java app build. It's prepared because our environment does not allow access to public internet and jcenter.
We're planning to configure build job with maven on Jenkins which takes all the necessary libraries from the Artifactory repository.
The library files are given by development team. It follows maven structure because it's exported from Maven on local development PC.
I zipped the files, placed on the server and hit the below code.
curl -u user:password -X PUT http://[artifactory URL]/../[repository name] /tmp/src/archive.zip
Expected successful files upload to the repository.
However, I've got the below error.
{"errors" : [ {
"status" : 403,
"message" : ""
}]
}curl: (3) <url> malformed
I zipped the files, placed on the server and hit the below code.
curl -u user:password -X PUT http://[artifactory URL]/../[repository name] /tmp/src/archive.zip
A few issues here:
As the error suggests, your URL is malformed. There should not be a /../. Just http://[artifactory URL]/[repository name] should be fine.
You're giving curl two bare paths, which it interprets as two URLs that it should PUT to. It's clear that this isn't your intent; the second path is the file you want to upload. You need to specify that by preceding it with, say, a -T.
This call will just upload the zip file into the root of your repository, but you want it to instead extract the contents. As stated by the documentation you linked, this can be done if you pass a header X-Explode-Archive: true or X-Explode-Archive-Atomic: true.
So your call should be something like:
curl -u user:password -X PUT http://[artifactory URL]/[repository name] -T /tmp/src/archive.zip -H 'X-Explode-Archive: true'
I figured out the cause. The reason was because our version is not Artifactory Pro.
I was told it's pro but confirmed the actually installed SW is OSS version.
Three months ago I could create Let's Encrypt certs on Mac successfully by following the instructions in this tutorial.
Now that I have tried to do exactly the same, the let's encrypt updated itself and it shows me the following error:
Macbook$ pwd
/Applications/certbot
Macbook$ ./certbot-auto certonly --standalone -d domain1.com -d domain2.com -d domain3.com -d domain4.com
Requesting root privileges to run certbot...
/Users/Me/.local/share/letsencrypt/bin/letsencrypt certonly --standalone -d domain1.com -d domain2.com -d domain3.com -d domain4.com
Password:
An unexpected error occurred:
ValueError: Invalid header value 'CertbotACMEClient/0.8.0 (darwin 10.10.5\n) Authenticator/standalone Installer/None'
Please see the logfiles in /var/log/letsencrypt for more details.
I removed the letsencrypt folder and tried this time installing git clone https://github.com/certbot/certbot but I still get the same error :(
I don't know if this is the same reported issue at github and I don't know either whether this has been solved or not.
I just tried again by downloading one more time the clone file but, it still doesn't work. :(
Does anybody know how to fix this??? Or is there another and simple way out there to get the certs (for example, online)?
I have found this one but it still looks complicated.
I had this problem too, and this pull request (that has been merged to master) seems to have fixed it:
https://github.com/certbot/certbot/pull/3118
Note that after updating your git checkout to this code, you still may still see the issue if a cached version of certbot is used or if certbot-auto updates itself and overwrites the fix from the source code.
Note the recommendation in this comment to remove cached files and run with --no-self-upgrade:
$ rm -fr ~/.local/share/letsencrypt
$ ./certbot-auto --no-self-upgrade --debug certonly ...