Teamcity build status icon on github: No permission to get data
The settings is in
Project -> Build Configuration Settings -> General Settings -> "enable status widget"
See Teamcity build badge on github
I've found the problem. It was not related to Github. It appears that Status Widget was not enabled for builds in question and in such situation status icon requires login. Enabling the widget solves the problem