GitHub has apologised for the disruption caused by US sanctions against several countries.
In a Twitter thread, CEO Nat Friedman responded to complaints that access to private repos and paid accounts has become restricted in Iran, Syria and Crimea, explaining that this was "to comply with US sanctions."
He emphasised that public and open source repos are not affected, and if users with affected private repos make them public, access will be restored.
It's also noted on the site's FAQ page that travelling to any of the three regions will prevent users from accessing GitHub, but this will be restored when they return to an unrestricted country and file an appeal.
GitHub is also working hard to process appeals from people who have been restricted erroneously. The restrictions, Friedman said, should only be based on place of residence and location, not nationality or heritage.
He added that GitHub's understanding of US trade laws means it was unable to give notice ahead of these restrictions being imposed.
"It is painful for me to hear how trade restrictions have hurt people," Friedman wrote. "We have gone to great lengths to do no more than what is required by the law, but of course people are still affected. GitHub is subject to US trade law, just like any company that does business in the US."
He later added: "We're not doing this because we want to; we're doing it because we have to. GitHub will continue to advocate vigorously with governments around the world for policies that protect software developers and the global open source community."