突然某天,公司的服务签名过期导致包签名失败了,于是修改过期时间如下:
gpg> expireChanging expiration time for the primary key.Please specify how long the key should be valid.0 = key does not expire<n> = key expires in n days<n>w = key expires in n weeks<n>m = key expires in n months<n>y = key expires in n yearsKey is valid for? (0) 2Key expires at Sat 11 Apr 2020 03:51:25 PM CSTIs this correct? (y/N) yYou need a passphrase to unlock the secret key foruser: "Cnangel (Search R & D Engineer) <cnangel@gmail.com>"1024-bit DSA key, ID FC0A6073, created 2009-06-01gpg: cancelled by usergpg: make_keysig_packet failed: Operation cancelledCommand> passwdKey is protected.can't connect to `/home/search_v/.gnupg/S.gpg-agent': Connection refusedYou need a passphrase to unlock the secret key foruser: "Cnangel (Search R & D Engineer) <cnangel@gmail.com>"1024-bit DSA key, ID FC0A6073, created 2009-06-01gpg-agent[60982]: command get_passphrase failed: Operation cancelledgpg: cancelled by userCan't edit this key: General error
出错了,查询资料发现是tty终端权限问题,加上权限即可:
# chmod o+rw $(tty)
解决问题。