a git curiosity: pushing to a home directory requires dot in path to make it work
I'm making a small service, and the service includes a git repository accessible over ssh, and I don't really want the service interface / address of the repository to include a path. serviceuser@servicednsname: would be fine.
I tried creating a bare git repository in the user's home directory (I assume, but have not tested, that the results are the same whether it's a bare repository or a .git repository). The result is the following error:
$ git push $servicednsname:
fatal: '' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So it (is it called git-receive-packs or something? I can't remember) doesn't like an empty path. But if I put a dot, to signify the current working directory, then it works:
$ git push $servicednsname:.
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 222 bytes | 222.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
To wiki.example.org:.
c8759e02..530e1f5c master -> master
So the "service component interface spec with address", if that's not too highfalutin for what this thing actually is, is something like "git/ssh repository pushable and fetchable at user@wiki.example.org:.", with the final dot being significant.
Comments
Post a Comment