You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am maintaining an automated Nexus installation on kubernetes with a git bash script running on windows. With the recent 3.77.1 version, it is required to accept end use licence which can be done via the REST API.
My issue is that the script I wrote to do this EULA acceptance fails with an error I don't understand.
My issue is that when I do it via this script:
# Retrieve licence data and update acceptance
EULA_FILE="$(mktemp)_EULA.json"
curl -s -X GET -u "admin:$NEXUS_PASSWD" -H "accept: application/json" "$NEXUS_URL/service/rest/v1/system/eula" | sed 's/: false/: true/g' > $EULA_FILE
# Send back acceptance
curl -v -s -X POST -u "admin:$NEXUS_PASSWD" -H "Content-Type: application/json; charset=UTF-8" -d "$(cat $EULA_FILE | sed 's/\n//g')" "$NEXUS_URL/service/rest/v1/system/eula"
* Host nexus-camel-k:48081 was resolved.
* IPv6: (none)
* IPv4: 127.0.0.1
* Trying 127.0.0.1:48081...
* Connected to nexus-camel-k (127.0.0.1) port 48081
* Server auth using Basic with user 'admin'
> POST /service/rest/v1/system/eula HTTP/1.1
> Host: nexus-camel-k:48081
> Authorization: Basic YWRtaW46Y2MwMzhiZWEtZjFhMy00OWUwLTlkNDYtNGU5NGY0YWRlNzNl
> User-Agent: curl/8.7.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 392
>
* upload completely sent off: 392 bytes
< HTTP/1.1 400 Bad Request
< Date: Tue, 11 Feb 2025 08:36:28 GMT
< Server: Nexus/3.77.1-01 (COMMUNITY)
< X-Content-Type-Options: nosniff
< Content-Type: application/json
< X-Siesta-FaultId: e5506fa5-569c-4571-b12a-736924f3e0e0
< Content-Length: 76
The content of the EULA file is:
{
"accepted" : true,
"disclaimer" : "Use of Sonatype Nexus Repository - Community Edition is governed by the End User License Agreement at https://links.sonatype.com/products/nxrm/ce-eula. By returning the value from ‘accepted:false’ to ‘accepted:true’, you acknowledge that you have read and agree to the End User License Agreement at https://links.sonatype.com/products/nxrm/ce-eula."
}
Using 'od' I didn't find any 0x91 byte. All my previous requests are working fine.
I also tried the remove the single quotes which I suspect to be the root cause of the issue and I got an http code 500 in return.
Is there any way to have this working or it is an issue with nexus ?
Tx
The text was updated successfully, but these errors were encountered:
I am maintaining an automated Nexus installation on kubernetes with a git bash script running on windows. With the recent 3.77.1 version, it is required to accept end use licence which can be done via the REST API.
My issue is that the script I wrote to do this EULA acceptance fails with an error I don't understand.
My issue is that when I do it via this script:
I receive the following response from the server:
Full verbose trace is:
The content of the EULA file is:
Using 'od' I didn't find any 0x91 byte. All my previous requests are working fine.
I also tried the remove the single quotes which I suspect to be the root cause of the issue and I got an http code 500 in return.
Is there any way to have this working or it is an issue with nexus ?
Tx
The text was updated successfully, but these errors were encountered: