I'm trying to resolve SNAPSHOTS artifacts deployed on the local repository (libs-snapshots-local) but I'm having an unexpected behavior :
when wgetting my/group/artifact/1.0-SNAPSHOT/artifact-1.0-SNAPSHOT.jar artifactory redirects me to my/group/artifact/1.0-SNAPSHOT/artifact-1.0-SNAPSHOT.jar/ (same url with a slash added)
then the subsequent request will fail with error 404
Does anyone know how to fix this ? Is this happening to anyone ?
UPDATE:
If I try to resolve the artifact using the libs-snapshots-local the download will succeeed but if I try with the virtual repository repo it will not work:
wget http://artifactory:8080/repo/my/group/artifact/1.0-SNAPSHOT/artifact-1.0-SNAPSHOT.jar = REDIRECT then 404
wget http://artifactory:8080/libs-snapshots-local/my/group/artifact/1.0-SNAPSHOT/artifact-1.0-SNAPSHOT.jar = OK
But the virtual repository repo should contains all the other repository by default (and I don't know if it is even possible to change this behavior).
The root cause of this issue is related to a redirect performed by a remote Maven repository - http://mirrors.ibiblio.org/pub/mirrors/maven2.
In some cases this redirect will cause Artifactory to assume it got a proper response from the remote repository while actually it is not the expected type of response (getting an HTML document with the repository listing instead of an artifact content).
For more details see the answer to this question
Related
I am trying to make my jar available in maven central .All works fine when I do it manually from nexus repository manager UI. Problem occurs when I try to automate the complete steps using sbt-release plugin .On running sonatypeRelease I see it tries to connect to Nexus repository URL: https://oss.sonatype.org/service/local and later failed to connect throwing below error
No credential is found for oss.sonatype.org. Prepare ~/.sbt/(sbt_version)/sonatype.sbt file .
In my sonatype.sbt URL I have set below config
credentials += Credentials(
"Sonatype Nexus Repository Manager",
"s01.oss.sonatype.org",
"username",
"password"
)
I am not sure how can I make sonatypeRelease take the config url instead of default one .I am quite sure this sonatype.sbt is being referenced as publishrelease works and it takes the correct sonatype nexus repository URL.
Any help on this would be helpful
I missed putting these lines in my build.sbt file
sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
I want to use Go Remote repository proxying Github. I have created Go remote repo github proxying https://github.com/ and I have created a Go virtual repository as well. Credentials added as mentioned in https://www.jfrog.com/confluence/display/RTF/Go+Registry#GoRegistry-RemoteRepositories.
I did everything explained on the link above but when I tried to get the modules I get that:
go env -w GONOSUMDB="*github.com/xxx/*"
export GOPROXY="https://test:%5Bredacted%5D#xxx.jfrog.io/artifactory/api/go/go"
go mod download -x
get https://test:%5Bredacted%5D#xxx.jfrog.io/artifactory/api/go/go/github.com/xxx/platform/#v/v0.21.0.mod
get https://test:%5Bredacted%5D#xxx.jfrog.io/artifactory/api/go/go/github.com/xxx/platform/#v/v0.21.0.mod: 404 Not Found (0.894s)
go: github.com/xxx/platform#v0.21.0: reading https://test:%5Bredacted%5D#xxx.jfrog.io/artifactory/api/go/go/github.com/xxx/platform/#v/v0.21.0.mod: 404 Not Found
Besides that, I can get public modules from github. Auth seems not working.
You should upgrade to JFrog Artifactory 6.19+ or 7.4.0+ as this was a missing feature until then (https://www.jfrog.com/jira/browse/RTFACT-19395).
I got 404 error when I go get through Artifactory remote repo.
$ go get -v github.com/pkg/errors
go get github.com/pkg/errors: unexpected status (http://myartifactory:8081/artifactory/api/go/go/github.com/pkg/errors/#v/list): 404 Not Found
What I have:
go v1.11
artifactory v6.5.9
GO111MODULE=on and GOPROXY=${ARTIFACTORY_URL}
What I found in the Artifactory remote repo is a goget.html showing a Github page. It seems Artifactory is unable to clone the remote repo from Github but just saved an irrelevant html page. May I ask what's possible reason cause this problem? Thanks in advance.
This is fixed in v6.7.
Artifactory 6.7 Release Note
Fixed an issue in which under certain circumstances, an Artifactory remote Go repository would cache a goget.html file instead of the corresponding Go module.
I uploaded file using mvn deploy:deploy-file but I uploaded wrong file. How can I update or remove this file if I don't have direct access to nexus?
Ask your Nexus admin to delete it through the UI.
If this is a SNAPSHOT, you also have the option of deploying the same file using the same version number. That way, when others reference 1.2.3-SNAPSHOT, they get the intended version. And eventually the bad SNAPSHOT will probably get deleted through a scheduled job. This is a decent workaround while you contact your Nexus administrator.
I'm performing a release of a project on Github using Maven. release:prepare fails with:
[ERROR] Provider message:
[ERROR] The git-push command failed.
[ERROR] Command output:
[ERROR] remote: Permission to FOO/BAR.git denied to BAZ.
[ERROR] fatal: unable to access 'https://github.com/FOO/BAR.git/': The requested URL returned error: 403
The weird thing is that BAZ is the "wrong" github.com account. It is one of two user names I use on Github, but not one I have ever used with the BAR project. Let's say the right account is FIZZ.
SCM settings don't specify a user name:
<scm>
<connection>scm:git:https://github.com/FOO/BAR.git</connection>
<url>scm:git:https://github.com/FOO/BAR.git</url>
<developerConnection>scm:git:https://github.com/FOO/BAR.git</developerConnection>
...
</scm>
(FOO is an organization that I'm part of.) In fact, I can't figure out where on earth BAZ is coming from. It's not in ~/.gitconfig or .git/config. There is no ~/.m2/settings.xml file. My Maven settings.xml file says nothing about Github.
If I use git on the command line it works -- push is fine for example.
Can anyone tell me where else this might be coming from? a hidden config file or directory somewhere, whether Maven- or Git-related?
Or, what's the best practice for recording the Github user to use in a private local file, like a Maven settings.xml or .git/config, such that I need not put my own user into the build file?
I'm using Mac OS X.
The simplest thing would be to explicitly use an ssh url, see more details in this answer.
git remote set-url origin git#github.com:FIZZ/FOO/BAR.git
Finally figured this out. The problem is that I'm on OS X, and had logged in to my second account BAZ via Safari. This saved the username and password for https://github.com in Keychain. Apparently, the Maven SCM plugin consults this for HTTPS URLs, although git won't. After clearing Keychain, it correctly prompted me for a username and password.