Some clarity on this issue.
First, Sarah Palin was a really bad pick. She's a nice enough lady, but she really didn't merit being on a national ticket. She hadn't even been governor for two years at that point of one of the smallest states of the union. But McCain was trying to throw a hail mary pass. Couldn't take Romney as a running mate without ticking off the Christian Right and couldn't pick Huckabee without ticking off Wall Street. She had a thin resume and was a woman. A man with that thin a resume never would have been picked.
Second, it's disingenuous to blame Palin for McCain's loss. McCain got the nomination because the other picks were so bad. (Although compared to the current bunch of jokers, he's taking on a new luster.) But I'm still not understanding what his rationale was for getting elected. "More of the Same". People were sick of war and recession. If the wars had been resolved and the economy was solid, he probably would have won.
Third, the Republicans have bigger problems beyond McCain and Palin. Demographics are not their friend. If the racial proportion in the vote were the same as they were in 1976, they'd have won. In 1976, whites made up 90% of the electorate, and McCain won 55% of the white vote. But he only got 4% of the black vote, 31% of the Hispanic vote, and 44% of the Asian vote. The GOP has dug itself into a big hole by playing on the fears of angry white males, and in 2008, it caught up with them.