I am cloning a single branch from a repository and creating a tag in a python script. The commands are as follows.
git clone -b master --single-branch
I had the same issue. You have to commit first before tagging
git commit
because you put tags on commits. So when there is no commit (like in your situation), you can't create a tag.