Closed visibilityspots closed 10 years ago
401 indicates missing authentication. The repoclient does not automatically
ask for authentication in that case.
Did you do that from a whitelisted host?
If so, that sounds like a bug.
If not use --username=
Oli
2014-05-28 14:54 GMT+02:00 Jan Collijs notifications@github.com:
I tried to remove an rpm from the repository but got an ERROR: repoclient deleterpm REPONAME x86_64/PACKAGENAME
ERROR: Got unexpected status code 401. Expected 204. The server said:
— Reply to this email directly or view it on GitHubhttps://github.com/ImmobilienScout24/yum-repo-client/issues/9 .
Hi,
Not sure if that's the problem, but FWIW the yum-repo-server API expects the full RPM filename, not just the package name.
e.G. repoclient deleterpm REPO x86_64/my-awesome-software-1.0.0-2.x86_64.rpm
The easiest way to do this is copy-paste the RPM filename from the repo list view.
Edit: Oops, I read 404, not 401.
But than it is a bug to reply with a 401 and not with a 404.
2014-05-28 16:17 GMT+02:00 Maximilien Riehl notifications@github.com:
Hi,
Not sure if that's the problem, but FWIW the yum-repo-server API expects the full RPM filename, not just the package name.
e.G. repoclient deleterpm REPO x86_64/my-awesome-software-1.0.0-2.x86_64.rpm
The easiest way to do this is copy-paste the RPM filename from the repo list view.
— Reply to this email directly or view it on GitHubhttps://github.com/ImmobilienScout24/yum-repo-client/issues/9#issuecomment-44412033 .
@oli99sc yes I think your reply was spot-on. I misread the 401.
@mriehl you were also right, in the yum-repo-server API, the resource responsible for the delete call only matches on a path ending with .rpm. If this is true, it always answers with a 204. Either because the file is now deleted or it was not there and stil is deleted :-).
Hi,
ghna had to edit my previous comment since the authentication was indeed the issue.
Thanks for the help :s :)
There's the textual HTTP status code in parens now, so that it's easier to understand. Seems that tomcat provides more helpful error messages in the response body, BTW, but I think it's good to have the status text just after the status code anyway.
mriehl@machine ~ $ repoclient deleterpm foorepo foobar
ERROR: Got unexpected status code 401 (Unauthorized). Expected 204.
The server said:
# HTTP Status 401 - Full authentication is required to access this resource
* * *
**type** Status report
**message** _Full authentication is required to access this resource_
**description** _This request requires HTTP authentication._
* * *
### Apache Tomcat
I tried to remove an rpm from the repository but got an ERROR: