Open maodia opened 10 months ago
可以把完整的日志发一下,如果同步一个镜像的时候没有找到对应的认证信息的话,会有 Auth information not found for <镜像>, access will be anonymous
的日志的。
换成了harbor上我个人的账号以后,可以正常同步了,所以应该是那个ci机器人账号(robot$mgsc+ci)的问题,请问用户名中包含$符号的话,在auth.yaml里面需要转义吗? @hhyasdf
换成了harbor上我个人的账号以后,可以正常同步了,所以应该是那个ci机器人账号(robot$mgsc+ci)的问题,请问用户名中包含$符号的话,在auth.yaml里面需要转义吗? @hhyasdf
理论上应该是不需要的,就是正常的 json 解析。
@hhyasdf 好的,谢谢,反正先用我自己的账号好了,能用就行,完整错误日志如下,可以做个参考:
time="2023-11-03 11:41:47" level=info msg="Executing analyzing image rule for alpine:3.16.7 -> registry.xxx.com/mgsc/test/alpine..."
time="2023-11-03 11:41:47" level=info msg="Auth information not found for docker.io/library/alpine, access will be anonymous."
time="2023-11-03 11:41:47" level=info msg="Finish analyzing image rule for alpine:3.16.7 -> registry.xxx.com/mgsc/test/alpine. Now 1/1 tasks have been processed."
time="2023-11-03 11:41:47" level=info msg="Executing generating sync tasks from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Finish generating sync tasks from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7. Now 2/2 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:16c78d841b79b24d0181ad528c9a68735689afd2d8e15929a854153d77fce0fa(1.472kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:914bba6388ed456cc03cda814d60bb12bec3fa5efeae69b6227579f697e31c2f(1.474kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:8fe0ba36ce570565c25722cc319cc6ac15efd26ca132457e2cce32e25a0c4ae0(1.47kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:e5761c1ed80af1ea48f655cdeb0fa9a89fe7d3903985d9ea08286e940a4f30dd(2.592MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:cc1a557f8d111cc8c11359cd168abb441e150c9dc42a046349c5e51132461a47(2.802MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:e5761c1ed80af1ea48f655cdeb0fa9a89fe7d3903985d9ea08286e940a4f30dd(2.592MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: ignore exist blob. Now 3/16 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:be0d19c155de823c6b37eaaba7cdec9085e8f1e39b1dd5982a19acb6c8c97cc5(2.811MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:8fe0ba36ce570565c25722cc319cc6ac15efd26ca132457e2cce32e25a0c4ae0(1.47kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: ignore exist blob. Now 4/16 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:47a0d92d42c91235d8221eedbf173becb158b4b9f672e3b82d33b700eb41b852(1.487kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:914bba6388ed456cc03cda814d60bb12bec3fa5efeae69b6227579f697e31c2f(1.474kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: ignore exist blob. Now 5/16 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:bdb2de7ba06c3a4e10b98f439a8c70afd63eee492c2ddc32342331a8e9ef4ff7(2.708MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:cc1a557f8d111cc8c11359cd168abb441e150c9dc42a046349c5e51132461a47(2.802MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: start to sync manifest. Now 6/16 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:be0d19c155de823c6b37eaaba7cdec9085e8f1e39b1dd5982a19acb6c8c97cc5(2.811MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: start to sync manifest. Now 7/17 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:16c78d841b79b24d0181ad528c9a68735689afd2d8e15929a854153d77fce0fa(1.472kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: start to sync manifest. Now 8/18 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f..."
time="2023-11-03 11:43:15" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c: failed to put manifest: uploading manifest sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 9/19 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:51610eda6112c65565923bc92d7f8299b444dabbd19771c726cf115de0f5ee81(1.485kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:47a0d92d42c91235d8221eedbf173becb158b4b9f672e3b82d33b700eb41b852(1.487kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: ignore exist blob. Now 10/19 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:d27c9f7e5791cecbf0251c0e7638ad6fbd2b510f038f66cc06c933da98c75979(2.419MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37: failed to put manifest: uploading manifest sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 11/19 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:0da8494b327cfeb94b68ad8b96761eb63d3c71930e291575c4dbb27c81db8609(1.485kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f: failed to put manifest: uploading manifest sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 12/19 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:dffa980f71c953938bb194a457aa62e7f1885137331eef8bf7f9403c075f711c(2.616MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:bdb2de7ba06c3a4e10b98f439a8c70afd63eee492c2ddc32342331a8e9ef4ff7(2.708MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: start to sync manifest. Now 13/19 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46 to registry.xxx.com/mgsc/test/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:51610eda6112c65565923bc92d7f8299b444dabbd19771c726cf115de0f5ee81(1.485kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: ignore exist blob. Now 14/20 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:187eae39ad949e24d9410fa5c4eab8cafba7edd4892211c1d710bdaf49265c37(1.47kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:d27c9f7e5791cecbf0251c0e7638ad6fbd2b510f038f66cc06c933da98c75979(2.419MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: start to sync manifest. Now 15/20 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:dffa980f71c953938bb194a457aa62e7f1885137331eef8bf7f9403c075f711c(2.616MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: start to sync manifest. Now 17/21 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7..."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:0da8494b327cfeb94b68ad8b96761eb63d3c71930e291575c4dbb27c81db8609(1.485kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: ignore exist blob. Now 16/21 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing blob sha256:659d66d51139e8abad819d17e5d3c45eb82e88b9fc588c4de7711f251309b9d2(2.808MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7..."
time="2023-11-03 11:43:15" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7: failed to put manifest: uploading manifest sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 18/22 tasks have been processed."
time="2023-11-03 11:43:15" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225: failed to put manifest: uploading manifest sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 19/22 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:187eae39ad949e24d9410fa5c4eab8cafba7edd4892211c1d710bdaf49265c37(1.47kB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: ignore exist blob. Now 20/22 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Finish synchronizing blob sha256:659d66d51139e8abad819d17e5d3c45eb82e88b9fc588c4de7711f251309b9d2(2.808MB) from docker.io/library/alpine:3.16.7 to registry.xxx.com/mgsc/test/alpine:3.16.7: start to sync manifest. Now 21/22 tasks have been processed."
time="2023-11-03 11:43:15" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8..."
time="2023-11-03 11:43:15" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8: failed to put manifest: uploading manifest sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 22/23 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46 to registry.xxx.com/mgsc/test/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46: failed to put manifest: Put \"https://registry.xxx.com/v2/mgsc/test/alpine/manifests/sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46\": EOF. Now 23/23 tasks have been processed."
time="2023-11-03 11:44:30" level=info msg="Start to retry tasks, please wait ..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225..."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c: failed to put manifest: uploading manifest sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 1/7 tasks have been processed."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8..."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37: failed to put manifest: uploading manifest sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 2/7 tasks have been processed."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46 to registry.xxx.com/mgsc/test/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46..."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f: failed to put manifest: uploading manifest sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 3/7 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7: failed to put manifest: uploading manifest sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 4/7 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225: failed to put manifest: uploading manifest sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 5/7 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8: failed to put manifest: uploading manifest sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 6/7 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46 to registry.xxx.com/mgsc/test/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46: failed to put manifest: uploading manifest sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 7/7 tasks have been processed."
time="2023-11-03 11:44:30" level=info msg="Start to retry tasks, please wait ..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7..."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225..."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine@sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c: failed to put manifest: uploading manifest sha256:e2f00b814b99684329237c2544549778530e8bfc0a61fb6bb2bbc861b94df61c to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 1/7 tasks have been processed."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8..."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine@sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37: failed to put manifest: uploading manifest sha256:a0a11dff72bf48de4d1fa0a6f8a667e7757b6b429c39ac6c193c020b3e260f37 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 2/7 tasks have been processed."
time="2023-11-03 11:44:30" level=info msg="Executing synchronizing manifest from docker.io/library/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46 to registry.xxx.com/mgsc/test/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46..."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine@sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225: failed to put manifest: uploading manifest sha256:7e3084b12ed39d65041be49281b92d907978019059fe36c90ba9ca5f6efcc225 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 3/7 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine@sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7: failed to put manifest: uploading manifest sha256:67daaffe5f53c39269efbc3a35a714b74cc2d9e956fbeb660d9adf680c2065f7 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 4/7 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine@sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f: failed to put manifest: uploading manifest sha256:62ca58ab596d3061dc70069f808f2ec4845e15160e189dfd79f1191e5e32388f to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 5/7 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine@sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8: failed to put manifest: uploading manifest sha256:b7976818ac23c46dbc69437dd41c5ba32750f0345ad706209d2208b4db84e1e8 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 6/7 tasks have been processed."
time="2023-11-03 11:44:30" level=error msg="Failed to executed synchronizing manifest from docker.io/library/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46 to registry.xxx.com/mgsc/test/alpine@sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46: failed to put manifest: uploading manifest sha256:94ffe8073d2b47b3196a4bddd0c8014f694adcb6218f2e4b6bc64b9b3adc8e46 to registry.xxx.com/mgsc/test/alpine: unauthorized: unauthorized to access repository: mgsc/test/alpine, action: push: unauthorized to access repository: mgsc/test/alpine, action: push. Now 7/7 tasks have been processed."
time="2023-11-03 11:44:30" level=info msg="Finished, 7 tasks failed, cost 2m43.265868783s."
这里的原因应当是,读取 auth信息时,代码使用了 os.ExpandEnv() ,导致$后面的内容作为env被识别和替换了。 可以试试在配置文件中使用 \ 来escape掉 $ ,在os.ExpandEnv中他是起作用的。 例如 : 配置文件中的 aaa$bbb 改为 aaa\$bbb
Bug Report
Type: bug report
What happened
尝试从docker hub同步一个镜像到内网私有镜像仓库时报错,错误日志如下:
What you expected to happen
期望镜像能同步成功
How to reproduce it (as minimally and precisely as possible)
执行命令:./image-syncer --auth ./auth.yaml --images ./images.yaml
auth.yaml:
images.yaml
Anything else we need to know?
1.真实镜像仓库域名使用registry.xxx.com进行了替换,mgsc是harbor上建的一个project
Environment
cat /etc/os-release
): centos 7habor
): habor v2.6.2-498e7e21