I would not suggest that it's okay even for a private repo. Never let your private keys leave your machine or its dedicated, encrypted backup.
Although I would never do this myself, if the keys themselves are encrypted with a password and then uploaded, it's not nearly as bad.
This kind of thing is best suited for a private repo (github is still ok, just make it private) - cause it's most likely of no use to anyone but that single user.