Street dog too much attached to me,now creating problems for himself!!!

So I have been giving food and water to a street dog in my lane from last 1 year. He also stays in my building and sleeps on terrace outside my house gate. Off lately he has been too much attached to me and my partner and follows us while we are walking. When I’m not at my home he goes to my partner’s house and starts knocking and barking there late at night. This is creating a problem for and for us also since people have started complaining now. I am really concerned and I don’t want the dog to face any repercussions. How do I handle this? Please help. I really am worried