For each section of your riff, choose a chord that contains as many notes for that section as possible. You can start with the chord that has a root note (G for a G minor, D for D minor, F for F major, etc.) common to the first note played in the section where a new chord is indicated.
Can a riff be chords?
A riff is a recognisable sequence of single notes or chords, usually played on a guitar. A riff is (usually) played on top of a chord progression. A riff is a progression of notes, usually played on top of some chords (could be played a capella, could be played over one chord, could be anything).
How do I know what key a riff is in?
How can you determine it for riffs rather than chords? you find out by the number of flats on the key signature, that is if you are talking about actual notes... no flats or sharps is the key of C, 1 # is in the key of G, 2 # is in the key of D......