Recently, I quitted my current research group and I will start to work with someone else. I was in my former research group for almost three years and during these three years I wrote more 200,000 lines of codes by myself alone. These codes rest in my former advisor group repository in Github, but I have copies of them locally in my computer. I know and I understand totally that I'm not allowed to use those codes without my former adviser agreement and also he is not allowed to do so without my agreement. Recently, he removed and revoked my access to the codes that are written by myself during these three years. As I said, I don't want to use them without his agreement, but I'm wondering why he restricted my access to something that completely is written by me and from scratch. I have the local backups but it just makes me upset and I'm wondering if he is allowed to remove my access or not?
Although the question is answered, I would like to add something more.
The fact that you are being blocked from the github may be more than just the former supervisors right, but also your access to ongoing development. They may be simply removing you from a repository that they plan to continue to work on and develop, in which case you should not have access to ongoing work in a lab you are no longer part of.