1.为什么我在远程新建的仓库,只能pull.不能push.
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (17/17), 2.92 KiB | 0 bytes/s, done.
Total 17 (delta 9), reused 0 (delta 0)
error: Unable to append to ./logs/refs/heads/master: Permission denied
To git@192.168.1.94:/home/gitrepo/renhang.git
! [remote rejected] master -> master (failed to write)
error: failed to push some refs to 'git@192.168.1.94:/home/gitrepo/renhang.git'
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
提示权限不够,请检查下本地仓库目录的权限
你可以pull但不能push,可能是因为还没有设置本地的SSH keys,所以git认为你在pull别人的东西,因为是开源的,所以可以随便pull;但是git认为你没有获得权限,所以不让你push去修改别人的东西。
具体可以:点击Settings,点击SSH and GPG keys去设置本地的权限。
检查
user.name和user.email是否正确Permission denied 权限问题