is there any international law (Geneva, Rome, UN) that the UN recognises that gives the right to people under occupation to resist the occupier with violence?
A right of individuals to resist is not directly recognized under international law, but it has been argued (paywall) to follow from a sometime-recognized of a people's right of self-determination. UN Resolution 2625 endorses "the principle of equal rights and self-determination of peoples", though this is framed in terms of States and not populations within a state (in other words it could be applicable if Canada invaded the US, but international law does not apply to Canada-internal or US-internal controversies). The African Charter on Human and Peoples' Rights (Art 20(2)) comes a little closer, saying that a "colonized or oppressed people shall have the right to free themselves from the bonds of domination by resorting to any means recognized by the international community". Theoretically this could have been applicable to the apartheid regime of South Africa, except South Africa was not a member of the OAU until after regime change. Even then, violence is not a means recognized by the international community. No global legal provision gives any group a right to violence in order to achieve a political end.
Depends on how they do it.
The Geneva Conventions applies certain provisions to
(2) Members of other militias and members of other volunteer corps, including those of organized resistance movements, belonging to a Party to the conflict and operating in or outside their own territory, even if this territory is occupied, provided that such militias or volunteer corps, including such organized resistance movements, fulfil the following conditions:
(a) that of being commanded by a person responsible for his subordinates;
(b) that of having a fixed distinctive sign recognizable at a distance;
(c) that of carrying arms openly;
(d) that of conducting their operations in accordance with the laws and customs of war.
Basically, an occupied people can resist if they behave they way an "official" army is expected to behave.
- They do not have to have fancy uniforms, it is enough if they wear a colored bandanna and that color is understood to signify a fighter.
- They do not have to have officers commissioned by their sovereign, it is enough that there are leaders who are in charge of their followers.
- And, notably, they are expected to follow the rules of war.
So if violent resistance takes the form of someone in civilian clothing planting a roadside bomb, that is not covered. If it takes the form of guerillas ambushing a military convoy, that may be covered (wearing insignia and carrying arms openly does not mean to ignore proper tactics and camouflage).