Kaniko multi-stage dockerfile build issue
Author: harshadjoshi619Created Nov 7, 2023Updated Jun 2, 2025
Labelskind/bugpriority/p2area/authenticationissue/push-failsregistry/artifactory
**Actual behavior**
I am using kaniko-project/executor:v1.17.0-slim in my tekton pipeline. In case of normal dockerfiles it is working as expected but when we try with multi-stage dockerfiles it is giving me below error:
error pushing image: failed to push to destination ".../.../" UNAUTHORISED user is unauthorised to upload to ".../.../"
**Expected behavior**
Kaniko should upload multi-stage dockerfile image to artifactory
**To Reproduce**
Steps to reproduce the behavior:
1. create a dockerfile with multiple FROM statements in it
2. use kaniko version as kaniko-project/executor:v1.17.0-slim
**Additional Information**
I am already using /kaniko/.docker to store my credentials. Still facing same issue.
Kindly suggest some way to overcome this issue.
**Triage Notes for the Maintainers**
| **Description** | **Yes/No** |
|----------------|---------------|
| Please check if this a new feature you are proposing |
- - [ ]
- - [ ]
- - [ ]
- - [ ]
Source: GoogleContainerTools/kaniko