一:git push url 403 forbidden
背景: mac os 2个账号
排查问题: 花费1个小时
新账号的工程拉到本地,发现push url 403.
解决办法1: mac os 使用 ssh.但是很多 url访问的项目都要改ssh.不通用
final:
git remote set-url origin https://username@github.com/user/repo.git
比如 git remote set-url origin https://newUsername@github.com/user/repo.git
会弹密码框,重新输入密码就可以push
二:git mode 问题
https://blog.csdn.net/qq_41066340/article/details/84751850
今天执行git diff filename ,出现
old mode 100644 new mode 100755 的提示,如下图:
但是发现文件内容并没有发生改变
想起来中间执行过chmod 的操作,
切到源码的根目录下,
git config --add core.filemode false