Copying a protected repo locally then pushing to a new one

Sure this has been asked many times so apologies first.

I’ve just cloned a repo that is write protected. I’ve made modifications locally to the files so want to push it to a new repo which is mine. At the moment the local branch is still pointing to the write protected repo so the push gets blocked. how do I get this to push to a new repo on my account and not the old locked one?

Cheers for the help.

thanks for this info .

If you’re cloning a repo from other person / organization, you aren’t the owner of this repo, so, although you are getting a copy of this project, the best option maybe should be make a fork of this repo, when you create a fork, you will have an entire copy for you in your profile. 

I don’t know if this is the correct answer to your question.

If you have a git repository and you want to make push to another remote repository, you can add the url and send your local repository

# Set a new remote
$ git remote add other_repo https://your_remote_repo.git

$ git remote -v
# Verify new remote
> other_repo (fetch)
> other_repo (push)

# push
$ git push other_repo master