Search code examples
gitdockerdocker-volumegogs

Renew Gogs SSH Key via file replace?


I'm running the docker version of gogs. It is currently working with my SSH key and I want to refresh this key. Is it possible for me to copy the new key I generated into the docker data volume that is supporting the docker configuration files directly, instead of going through the ui?


Solution

  • No: as you can see in "routes/user/setting.go", a key is associated to a user.ID.

    Just copying the key (with docker cp) would only add the ssh key without registering its link to a user.