The following command will let pulls work, but pushes will try to use the URL no_push
and fail:
git remote set-url --push origin no_push
Depending on the remote, you may be able to reset its URL to use the read-only Git protocol instead of SSH or HTTPS. E.g., for a project on GitHub, do
git remote set-url <remote> git://github.com/Team/Project.git
where <remote>
is commonly origin
. git remote -v
will give you a list of remotes; those that start with https
or have the form <user>@<host>:<path>
usually allow pushing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With