On Friday, Business Insider reported that Microsoft was in talks to buy GitHub, people close to the companies told us.

The companies have had on-and-off conversations over the years, but talks grew more serious in the past few weeks, these people said.

It's a change of course from just six months ago, when GitHub, last valued at $2 billion in 2015, appeared fully committed to staying independent and pursuing an initial public offering.

Since then, GitHub had struggled to land a CEO to replace Chris Wanstrath, who announced his resignation in August but remains in the top role.

The Google executive Sridhar Ramaswamy was at one point under consideration for the GitHub CEO job, a source told Business Insider.

Microsoft has recently held talks to buy GitHub, reviving on-and-off conversations the two have had for years, according to people close to the companies.

The talks have come as GitHub, a popular platform for software developers, has struggled to hire a new CEO.

GitHub was last valued at $2 billion in 2015, thanks to a $250 million funding round led by Sequoia Capital, and it is doing well financially, multiple people told us. But the price tag for an acquisition could be $5 billion or more, and it's not clear whether Microsoft is willing to pay that much — or whether the talks are ongoing.

In August, Chris Wanstrath, GitHub's founder and CEO, said it was on a $200 million run rate in annual revenue.

If Microsoft were to acquire GitHub, it would mark a significant change of course from where the startup stood just six months ago. As recently as late 2017, insiders said GitHub was fully committed to staying independent and eventually going public.

It is also possible that instead of striking a deal to buy GitHub outright, Microsoft may make an investment — possibly with an option to buy — and allow one of its top engineers to be poached as CEO.

Microsoft declined to comment. GitHub did not respond to multiple requests for comment.

A protracted CEO search has left the company rudderless

GitHub has been looking for a new CEO for the past 10 months, since Wanstrath announced he would step down.

In February, company executives told employees they were close to hiring someone. The internal rumor was that this person was a senior manager with an engineering background from Google.

One person with knowledge of the matter told Business Insider that Sridhar Ramaswamy, Google's senior vice president of ads and commerce, was in discussions with GitHub about the CEO job. But those appear to have ended, and Ramaswamy is now in talks about joining GitHub's board — a role that, given his job at Google, could be tricky if Microsoft were to acquire GitHub.

There is also an internal rumor at GitHub that a Microsoft executive could be in the running for the CEO job, with or without an acquisition by the software giant. That person is said to be Nat Friedman, a well-known leader in the programmer world.

Friedman founded a popular developer-tools company called Xamarin, which Microsoft bought in 2016 for at least $400 million, and he has since been running Microsoft's huge developer-tools unit. Friedman did not return requests for comment.

GitHub's CEO search was announced in August. But now it's June. Wanstrath remains CEO, though multiple people have said that he rarely shows up at the office and that the company has been rather rudderless, with Chief Strategy Officer Julio Avalos running most units, including human resources, sales, legal, and business development.

There have been past flirtations

A combination of Microsoft and GitHub would make a lot of sense from a product and customer perspective, and it could provide stability for GitHub, which has found plans to monetize its popular products more challenging than expected and suffered a lot of turnover in its executive ranks.

GitHub allows developers to host their software projects in the cloud and work on them with other programmers. It's also a social network of sorts for developers, where they can follow one another and see their work.

Microsoft has explored an acquisition of GitHub before; at one point last year, a $5 billion deal was floated, multiple people told Business Insider. But we heard that things didn't get far or serious.

Are you a GitHub insider? We want to hear from you: jbort@businessinsider.com and bpeterson@businessinsider.com.