
# 上传模板失败如何解决？
#### 问题现象
上传模板时出现"请求失败，请稍后重试"的错误，错误码为**SVCSTG.CCECAM.4000121**，错误信息提示"Package name and version must be valid and same with chart name and version!"。
图1上传模板失败   
![](https://support.huaweicloud.com/cce_faq/zh-cn_image_0000001673818585.png "点击放大")
#### 问题原因
当出现以上报错内容时，说明模板Chart.yaml文件中的name和version字段和模板包名称不一致。
![](https://support.huaweicloud.com/cce_faq/public_sys-resources/note_3.0-zh-cn.png)
如果您需要自定义模板包的名称和版本，需要同步修改Chart.yaml文件中的name和version字段。
#### 解决方案
1. 查看模板Chart.yaml文件中的name和version字段。 
   例如，nginx-ingress的模板包中Chart.yaml文件如下，并定义模板包名称为**newer-nginx-ingress** ，版本为**4.4.2**：
   ```
   annotations:
     artifacthub.io/changes: |
       - Adding support for disabling liveness and readiness probes to the Helm chart
       - add:(admission-webhooks) ability to set securityContext
       - Updated Helm chart to use the fullname for the electionID if not specified
       - Rename controller-wehbooks-networkpolicy.yaml
     artifacthub.io/prerelease: "false"
   apiVersion: v2
   appVersion: 1.5.1
   description: Ingress controller for Kubernetes using NGINX as a reverse proxy and
     load balancer
   home: https://github.com/kubernetes/ingress-nginx
   icon: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Nginx_logo.svg/500px-Nginx_logo.svg.png
   keywords:
   - ingress
   - nginx
   kubeVersion: '>=1.20.0-0'
   maintainers:
   - name: rikatz
   - name: strongjz
   - name: tao12345666333
   name: newer-nginx-ingress
   sources:
   - https://github.com/kubernetes/ingress-nginx
   version: 4.4.2
   ```
   
   
2. 根据Chart.yaml修改模板包名称，模板包命名格式为：{name}-{version}.tgz，其中{version}为版本号，格式为"主版本号.次版本号.修订号"，如**newer-nginx-ingress-4.4.2**.tgz。
3. 重新上传该模板。
 
