Richard, I cannot reproduce this on the latest Katello code.
What I did:
1) Create a squid proxy that requires basic auth
2) Create that HTTP proxy in Foreman and test the connection
3) Create an ansible collection repository with "Use specific HTTP Proxy" and sync it
Can you check the following:
1) Find the ID of your ansible collections repo. You can find it in the URL when you click on the repository.
2) Run the following in the console (`foreman-rake console`):
::Katello::Repository.find(<id of the repo>).backend_service(SmartProxy.pulp_primary).remote_options
3) Check the output to see if the proxy_url, proxy_username, and proxy_password make sense
If they do make sense, we'd need to debug further -- probably on community.theforeman.org under the support section. Please add the Katello flag.
Also, are you still on Katello 4.3.1? We're currently almost up to Katello 4.8 now, please try upgrading to at least Katello 4.5.