The possible degrees for a graph with $n$ vertices is either $0,1,2, \dots, n-2$ or $1,2,3,\dots,n-1$.
Each of these contain $n-1$ degrees which have to be assigned to $n$ nodes.
Thus, by pigoenhole principle, there have to be at least two vertices of the same degree.