PhD at the same university as master's I received my bachelor's and master's degrees from university A. I was then supposed to do a PhD at university B in a different country but relocating did not work out (I did not start in the program). Some time later, I took a temporary research assistant position at university C. I was hoping to do a PhD also there but having considered the topic/group I think it is not a good fit for me.

I have discussed about returning to A but not signed a contract yet. Would it be disadvantageous to get all degrees from the same university?

I had very high expectation for the PhD since I was a very good student at A. However, I have now had two attempts going elsewhere and neither succeed. I am not sure how much support I would get for further applications.

Should I stay at A and try again after the PhD? The thing is, A is not very well-known university.
The most important part about where you do your PhD. is not so much about the standing of the university, but about the reputation of your PhD. adviser. Your name will be (forever) linked to his name and his reputation. If he is a well known researcher in your field, then you will carry this positive reputation with you. If he is not well known and he has issues getting funds, then in this case this might make your PhD. harder. If I were you, I would not worry about the reputation of University A., but about the reputation of your research group.

On another note, sometimes it can be problematic if you have done your Bachelor, Master and PhD. at the same institution. In this case, you will have experienced research in a single environment and this can be detrimental to your candidacy when applying for faculty position or etc. However, if you do a post-doc in another research group later on, you can mitigate this aspect. Like I said, if you feel the research group of University A has all you need and you like the work environment there (which is crucial to succeeding in your PhD.) then go ahead :)!.