A few things to highlight when doing a glissando are the following:
- Use your nails as much as possible and avoid your skin rubbing the keys.
- Be sure you are getting enough Vitamin D for your nail health.
- Go slow when learning.
- Repetition.
- Use the proper technique for going up and going down.
Are glissandos supposed to hurt?
A glissando should not cause any great pain. Even if you were playing in a large concert hall, it should not be the case that you hold your fingers so stiff that you have to make the glissando so loud for the audience. Loosen up and practice a glissando with just one finger even by just using your index finger.
Why do glissandos hurt?
The mistake you are making is that you are playing too deeply into the glissando--pressing the key down too far. Try it, only depressing the keys enough that it comes halfway down your thumbnail, and you'll find it's a lot easier. You can also play with other fingers or combination of fingers.