Layers which have git protocol urls for GitHub need to switch to https. GitHub has blocked unauthenticated git protocol. https://github.blog/2021-09-01-improving-git-protocol-security-github/
Is this something that Michael can do in the database?
Yes from the Admin interface all the project url for each layers can be updated. Django does support custom commands and it should be possible to make a command that will iterate through the layers and update any github urls.
The following should fix it: UPDATE layerindex_layeritem SET layerindex_layeritem.vcs_url = REPLACE(layerindex_layeritem.vcs_url,'git://github.com', 'https://github.com') WHERE layerindex_layeritem.vcs_url LIKE "git://github.com%";
After discussing with Paul, we do not want to do SQL directly. I'll need to refactor for 'manage.py shell' which I might have permissions to do (after testing on local instance).
Using manage.py shell: from django.db.models import Value from django.db.models.functions import Replace from layerindex.models import LayerItem layers = LayerItem.objects.all().filter(vcs_url__startswith='git://github.com') layers.update(vcs_url=Replace('vcs_url', Value('git://github.com'), Value('https://github.com')))
To get to the shell: docker exec -it <layersapp> sh -c "/opt/layerindex/manage.py shell" Count before fix: 106