I’m in the process of migrating from drone v0.8 to v1 and I am encountering some issues with the migration with
The repos owned by some users (looks like the ones that have not accessed drone or the scm for a while) show errors during the
The error is:
level=error msg="failed to get remote repository" error="Bad credentials" owner=xxx repo=my-organisation/my-repo
My understanding is that this is happening because the tokens cached in the drone db have expired.
The problem with this is that because the
update-repos step failed, those repos have still a temporary
uid as it could not be retrieved from the scm.
In turn, when a user logs in and the repos are synced, the repos that could not be updated by
drone-migrate appear as brand new repos as uids do not match. And because there is now a new record in the database representing that repo, the secrets that were migrated are
no longer associated with the repo.
Is there a way of overwriting the credentials used to obtain the UID of a repo if the cached credentials fail? I’m thinking about a way of specifying the token of an admin robot on the scm, something like DRONE_GITHUB_CLIENT_ID and DRONE_GITHUB_CLIENT_SECRET (supported by Drone server), but from what I’ve seen, that’s not supported by drone-migrate?