FATA[0065] Error pushing to registry: Authentication is required

Hi When ever i try to upload the image to my repository, I get the following error:

[root@localhost ~]# docker push docker_test/vim:1.0

Do you really want to push to public registry? [y/n]: y
The push refers to a repository [docker.io/docker_test/vim] (len: 1)
a70bf8793c8b: Image push failed

Please login prior to push:
Username (sawhna1):
WARNING: login credentials saved in /root/.dockercfg.
Login Succeeded
The push refers to a repository [docker.io/docker_test/vim] (len: 1)
a70bf8793c8b: Image push failed
FATA[0065] Error pushing to registry: Authentication is required.

I finally got the solution.

When you create a a tag for repository on your system it cant be something like docker_test/vim
mean to say it should be your registry name followed by image name e.g sawhna1/vim

REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
akshat/multi_img 1.1 fa9b321e1c5d 6 days ago 262.8 MB
akshat/multi_img 1.0 76ca6088778c 6 days ago 262.8 MB
sawhna1/vim latest a70bf8793c8b 6 days ago 242.9 MB (this one worked)
akshat/vim 1.0 a70bf8793c8b 6 days ago 242.9 MB
docker_test/vim 1.0 a70bf8793c8b 6 days ago 242.9 MB (this one does not work)
sawhna1/docker 1.0 a70bf8793c8b 6 days ago 242.9 MB
akshat/curl 1.0 e34f0b905556 6 days ago 199.7 MB
docker.io/tomcat 7 611a2cc9d3d0 3 weeks ago 348.3 MB
docker.io/ubuntu latest 6d4946999d4f 4 weeks ago 188.3 MB
docker.io/hello-world latest 91c95931e552 12 weeks ago 910 B
docker.io/centos 7 0114405f9ff1 12 weeks ago 215.7 MB
docker.io/centos centos7 0114405f9ff1 12 weeks ago 215.7 MB
docker.io/centos latest 0114405f9ff1 12 weeks ago 215.7 MB