When I create a file without a dot (hidden) and use gh
, (Github cli), to create a gist, it works.
But when I change it to a hidden file it fails to read a file.
# I can create a gist with a normal file.
shinichi@shinichi-Ubuntu:~$ gh gist create /home/shinichi/testing-gh
- Creating gist testing-gh
✓ Created gist testing-gh
https://gist.github.com/b2cd617f8cf35dc54986f5855ae92b1f
# checking permissions
shinichi@shinichi-Ubuntu:~$ ls -al ~/testing-gh
-rw-rw-r-- 1 shinichi shinichi 42 Jul 30 08:40 /home/shinichi/testing-gh
# Changing the file to a hidden one
shinichi@shinichi-Ubuntu:~$ mv testing-gh ./.testing-gh
# Creating a Gist fails
shinichi@shinichi-Ubuntu:~$ gh gist create /home/shinichi/.testing-gh
failed to collect files for posting: failed to read file /home/shinichi/.testing-gh: open /home/shinichi/.testing-gh: permission denied
# checking the permission
shinichi@shinichi-Ubuntu:~$ ls -al ~/.testing-gh
-rw-rw-r-- 1 shinichi shinichi 42 Jul 30 08:40 /home/shinichi/.testing-gh
This works on macOS, but not Ubuntu. Why is it? How can I fix the problem? How can I make a dotfiles Gist on Ubuntu?