vysheng / tg

telegram-cli
GNU General Public License v2.0
6.49k stars 1.54k forks source link

Couldn't open public key file: tg-server.pub #615

Open danielberlin opened 9 years ago

danielberlin commented 9 years ago

Due to README.md, the public key file is looked up at /etc/telegram-cli/server.pub where my RHEL RPM already installed it:

$ ls -la /etc/telegram-cli/server.pub 
-rw-r--r-- 1 root root 426 May 15 14:46 /etc/telegram-cli/server.pub

However, calling telegram-cli -v 0 tells me "Couldn't open public key file: tg-server.pub":

$ telegram-cli -U telegram -p profile -v 0 -e 'msg !_someuser msgtext'
Telegram-cli version 1.3.1, Copyright (C) 2013-2015 Vitaly Valtman
Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type `show_license'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show_license' for details.
Telegram-cli uses libtgl version 2.0.1
I: config dir=[/home/telegram/.telegram-cli]
 *** Couldn't open public key file: tg-server.pub

So either README.md is wrong where the file is mentioned to be named server.pub (thus RPM maintainers use server.pub and not tg-server.pub) or in telegram-cli code tg-server.pub instead of server.pub is referenced.

vysheng commented 9 years ago

it's ok, since telegram-cli checks several locations. Also -v 0 is incorrect, -v doesn't has argument, so -v 0 set verbosity to 1