Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 6

Push to a different repository

Solved! Go to Solution.

I would like to push some commits to a different repo within the same org but the GH token doesn't seem to be valid for other repos. What's the best way to push code to other repos?

5 Replies
Highlighted
Ground Controller Lvl 1
Message 2 of 6

Re: Push to a different repository

Hi,

 

I have same request do you have any solution about it ?

 

Awaiting your feedback about this case.

 

Thanks

 

---------------------------------------------------

 

Romaine

Highlighted
GitHub Staff
Message 3 of 6

Re: Push to a different repository

You need to create a personal access token.

Highlighted
Copilot Lvl 3
Message 4 of 6

Re: Push to a different repository

Thank you for the response. The PAT will have the same permissions as me, though, right? I'm a bit scared to give everyone in the repo access to all repos I have access to. Is there a way to scope the token? 

Solution
Pilot Lvl 1
Message 5 of 6

Re: Push to a different repository

I haven't found a way to scope the token, unfortunately -- one workaround is to create a bot account and only add it to a couple of repos, and then make the token with that account.

Highlighted
Ground Controller Lvl 2
Message 6 of 6

Re: Push to a different repository

can you please share the solution u have implemented. i have to implement the same solution.