I'm trying to figure out how to upload some rpm
files to a Nexus 3 yum repository. Can't figure out how to configure the request call.
Asked
Active
Viewed 4,167 times
0

Raktim Biswas
- 4,011
- 5
- 27
- 32

MrPY
- 67
- 2
- 7
2 Answers
0
Following this documentation, you can easily upload files to the hosted Yum repository using the HTTP PUT
method.
An example of using the same using python:
import requests
files = {'file': open('yourfile.rpm', 'rb')}
response = requests.post('http://nexusURL/repository/yumRepo/yourfile.rpm', files=files, auth=('username', 'password'))

Raktim Biswas
- 4,011
- 5
- 27
- 32
0
import requests
response = requests.put("https://example.com/repository/yum-local/yourfile.rpm", data=open('yourfile.rpm', 'rb'), auth=("admin_username", "admin_password"))

Max
- 11
- 1