Closed Sheridan closed 1 year ago
I am writing a module for ansible to work with aptly. Creating a mirror does not work - there is a strange Get link in the error.
Please tell me what I'm doing wrong? Python code:
self.api_post("api/mirrors", { "Name" : self.module.params['name'], "ArchiveURL" : self.module.params['url'], "Distribution" : self.module.params['distribution'], "Components" : self.module.params['components'], "DownloadSources" : self.module.params['with_sources'], "DownloadUdebs" : self.module.params['with_udebs'], "DownloadInstaller": self.module.params['with_installer'], "Filter" : self.module.params['filter'], "Keyrings" : [self.module.params['key']], })
and query:
( 'api/mirrors', { 'Filter': '.*', 'DownloadInstaller': True, 'DownloadUdebs': True, 'Name': 'microsoft', 'Components': ['main'], 'DownloadSources': True, 'Distribution': 'buster', 'Keyrings': ['https://packages.microsoft.com/keys/microsoft.asc'], 'ArchiveURL': 'https://packages.microsoft.com/debian/10/prod' } )
result (my format):
( 'Request fail', 400, 'http://localhost:8080/api/mirrors', '{ "error":"unable to fetch mirror: https://packages.microsoft.com/debian/10/prod/dists/buster/Release: Get \\"https:/debian/10/prod/dists/buster/Release\\": dial tcp 104.214.230.139:443: connect: connection refused" }' )
The problem is that Internet access is only through an http proxy. The system environment variables http_proxy and https_proxy are set. For localhost in python requests, the setting proxies={'no_proxy': 'localhost'} is set
proxies={'no_proxy': 'localhost'}
Hang up. Proxy was configured incorrectly
@Sheridan You should be able to close this issue - It seems to have been an error in your proxy setup, and not something we can fix.
I am writing a module for ansible to work with aptly. Creating a mirror does not work - there is a strange Get link in the error.
Detailed Description
Please tell me what I'm doing wrong? Python code:
and query:
result (my format):
The problem is that Internet access is only through an http proxy. The system environment variables http_proxy and https_proxy are set. For localhost in python requests, the setting
proxies={'no_proxy': 'localhost'}
is set