Actually, a lot of dependency managers are starting to accept git repos as dependency sources with pinned hashes as versions. Works out pretty well.
Whereas most public package registries generally don't allow removal of publicly published packages outside of special circumstances, so the references will be more durable.