The story
Supposedly a borrowing from Yiddish, with disputed origins. One theory is that it is a corruption of the German nicht gefiedelt ("not flustered"). Another possibility is that it comes from German ich kaan bedibbert ("I am abashed"). Possibly a fake Yiddishism.
Etymology from Wiktionary, CC BY-SA 4.0.