1、命令行执行获取密码
grep -A2 'trunk.cocoapods.org' ~/.netrc
例如:
MacBook-Air:~ mac$ grep -A2 'trunk.cocoapods.org' ~/.netrc
machine trunk.cocoapods.org
login test@qq.com
password 09ebdd342bbf1132327f1f464676146a
2、修改用户名 替换 <passward> <MY EMAIL> <MY NEW NAME> <My DESCRIPTION>
curl -v -H "Authorization: Token <passward>" -H "Content-Type: application/json" -X POST -d '{"email":"<MY EMAIL>","name":"<MY NEW NAME>","description":"<My DESCRIPTION>"}'https://trunk.cocoapods.org/api/v1/sessions
例如:
curl -v -H "Authorization: Token 09ebdd342bbf1132327f1f464676146a" -H "Content-Type: application/json" -X POST -d '{"email":"test@qq.com","name":"newName","description":"any you want"}'https://trunk.cocoapods.org/api/v1/sessions
成功后提示
{"created_at":"2019-05-08 02:11:05 UTC","valid_until":"2019-09-13 02:11:05 UTC","verified":false,"created_from_ip":"207.000.149.29","description":"any you want","token":"350a11e379a22963dbb16d99dce84d23"}
3、查看信息
pod trunk me