remote: Permission to xxx.git denied to xxx. fatal: unable to access 'https://github.com/xxx.git/':

remote: Permission to xxx.git denied to xxx. fatal: unable to access ‘https://github.com/xxx.git/’: The requested URL returned error: 403

原因:mac中keychain的应用存储了github先前访问的密码,每次push代码的时候都会读取本地用户名及密码,有可能本地保存的账号不是代码仓库的账号所以才被github denied。
解决:打开Finder ----> 应用程序 ---->实用工具 ---->keychain ---->双击,即可进入到钥匙串访问记录保存页面,选择github.com名称的应用,删除之前的保存记录。等下次push代码的时候会提示重新输入用户名及密码,再输入新的github账号及密码即可

你可能感兴趣的:(cocopods,cocoapods)