Yes, it is the right solution, but you should also consider Bit Bucket, as they offer unlimited private code repositories, which might be less expensive than GitHub.