[x]):log/gogs.log):2017/04/06 15:26:29 [TRACE] Custom path: /opt/gogs/custom
2017/04/06 15:26:29 [TRACE] Log path: /opt/gogs/log
2017/04/06 15:26:29 [TRACE] Log Mode: File (Trace)
2017/04/06 15:26:29 [ INFO] S3 Gogs 0.10.31.0327 / 0.11 RC
[Macaron] 2017-04-06 15:27:17: Started POST /api/v1/repos/migrate for 10.6.62.84
[Macaron] 2017-04-06 15:27:17: Completed POST /api/v1/repos/migrate 422 Unprocessable Entity in 72.154ms
] Session Service Enabled
2017/04/06 15:26:29 [ INFO] Git Version: 2.2.2
2017/04/06 15:26:30 [ INFO] SQLite3 Supported
2017/04/06 15:26:30 [ INFO] Run Mode: Production
2017/04/06 15:26:30 [ INFO] SSH server started on 0.0.0.0:2222
2017/04/06 15:26:30 [TRACE] SSH server cipher list: [aes128-ctr aes192-ctr aes256-ctr [email protected] arcfour256 arcfour128]
2017/04/06 15:26:30 [TRACE] Doing: CheckRepoStats
2017/04/06 15:26:30 [ INFO] Listen: http://0.0.0.0:3000
2017/04/06 15:27:17 [TRACE] Session ID: 5743419870af5d12
I cannot migrate a "local" repo, based on local path, using the api.
API call:
curl -u administrator --request POST --url http://localhost:3000/api/v1/repos/migrate --header 'content-type: application/json' --data '{"clone_addr": "/home/git/my-repo.git", "uid": 1, "repo_name": "new-repo"}'
At this point I am prompted for and enter my password.
API Call Response:
{"message":"You are not allowed to import local repositories.","url":"https://github.com/gogits/go-gogs-client/wiki"}
However, according to the docs here:
https://github.com/gogits/go-gogs-client/wiki/Repositories#migrate
I should be able to migrate local repos by passing their path?
Note: other API calls, e.g. search, complete as expected.
Thanks in advance
Hi, you can only migrate local repo as admin by default, otherwise given permission by admin.
Just adding this for other users...
The user WAS admin/had admin rights.
The issue was that ENABLE_LOCAL_PATH_MIGRATION had not been set in config file (/gogs/custom/conf/app.ini)
It would be great if the warning message could mention ENABLE_LOCAL_PATH_MIGRATION.
Most helpful comment
Just adding this for other users...
The user WAS admin/had admin rights.
The issue was that ENABLE_LOCAL_PATH_MIGRATION had not been set in config file (/gogs/custom/conf/app.ini)