工作过程中有遇到过git可以拉去代码但是提交失败的情况,可按照如下方式尝试解决:
首先找到出现该问题的id_rsa.pub
1.进入ssh目录
控制台输入:.ssh
2.进入公钥内容页:
cat id_rsa.pub
会得到如下内容:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDeTZQU38OkmQYbfXdOFC6eD/4haB3/Bp9CBCL5m+BBu6h7+L49jR6pvyc598/AoXZCD+AYTtkNSVtomvQogAAq1my0Xh5xp7SMUgc4MskaXV+No3o9hMWLfZGNTouwtWDkNNaVckSdgiujTqbzfzVcLla9AIJUIwH8FRtlmoEB3Q2FBun5rZwctsnm/Y77VLZjKCDqpI/Q7aFcDOzNQePW2KJb2mmPRJpCWWH1FdSFa0xK6bdv6QQIkWzxF4QxHLKSXwBpKvciSKEIKonvt7P7BA9X8rsFv33x56NL2vlZUEj6cIHIFOEg73Mth3mAla/klkdM4Z2Ks4THJWhfY4W5yInnK/cW/Jf89KxU3cO8p0CpzqfFVIqo/MUo4nHR3BQPaXtA6Z0UlAPZI9vpwBeCGzYaFNAId1EvRgTaShUmlwqr7mjTsLLXRn2R2AYzW+mNlSe6HQo4um/W4+WEPoqr1IvYt6IsGYHUBjF6k0JHs1X4aCWbPLwSHxcYgeMTwX0= balala@balalaMac-mini.local
3.复制如上内容
4.将复制的内容拷贝到gitlab上
网友评论