Code Monkey home page Code Monkey logo

Comments (4)

drybjed avatar drybjed commented on July 24, 2024

Will it work with https:// URL as well?

from debops-tools.

muelli avatar muelli commented on July 24, 2024

yes :) When https_proxy is set.

from debops-tools.

drybjed avatar drybjed commented on July 24, 2024

Great, I'll switch it then when I get a chance, or you could post a PR. Also, come over to #debops @ FreeNode if you want, some issues could be solved better in real time. :)

from debops-tools.

ganto avatar ganto commented on July 24, 2024

It seems that #109 is already fixing some of the proxy issues mentioned here, however, I have another special case where the debops-update script is not working well with git:// URIs.

In my case, outgoing traffic is only open to port 443. Requests to port 9418 are silently dropped. This leads to the following interesting side effect:

  • when running debops-update on a fresh installation, fetching the first role ansible-role-ansible succeeds, as the role name lookup heuristic which first tries to lookup the wrong role name ansible-ansible is falling back to the correct name after the timeout (return code 128) of the git ls-remote towards the blocked git:// URI (I added some debug statements to show the variable assignment):

    DEBUG: remote_uri = git://github.com/debops/ansible-ansible
    DEBUG: repo_status = 128
    DEBUG: remote_uri = https://github.com/debops/ansible-role-ansible
    Installing https://github.com/debops/ansible-role-ansible [master] (1/73)
    
  • for the subsequent roles which have a different naming scheme, the algorithm fails, as the second name which is requested is obviously wrong:

    DEBUG: remote_uri = git://github.com/debops/ansible-apt
    DEBUG: repo_status = 128
    DEBUG: remote_uri = https://github.com/debops/ansible-role-apt
    Installing https://github.com/debops/ansible-role-apt [master] (2/73)
    Username for 'https://github.com':
    
  • if I change the script to completely get rid of the git:// URI prefix, the first role will hang with an invalid URL.

  • the nasty thing is, that the HTTP and the git protocol don't behave the same when given an invalid URL and that the script behaviour is guessing the correct role name based on that. This makes it impossible at the moment to run the update over HTTPS only.

However, I think it should be possible to rename the ansible-role-ansible and at the same time get rid of the git:// prefix without breaking anything... What do you think?

from debops-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.