git报错: Could not read from remote repository.Please make sure you have the correct access rights
ERROR: Permission to apache/flink-cdc.git denied to ysksolution.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
出现这个问题,主要是因为ssh-key没有配置,解决方案:
(1)检查git初次配置,是否设置了user和email
设置user和邮箱,首次使用,必须要设置
git config --global user.name username
git config --global user.email email
检查内容
git config --list
(2)取消各种代理
git config --global --unset http.proxy
git config --global --unset https.proxy
(3)配置ssh key
rm -rf ~/.ssh/
ssh-keygen -t rsa -C email(邮箱名)
将生成的公钥复制到github中,进入setting界面