You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on synchronizing two repositories (from repoA to repoB) using Copybara running in a Docker container. Below is the command I'm using to initiate the sync process:
I've noticed that the name and email from ~/mongodb-bot.gitconfig are being utilized correctly during the sync to repoB. However, now I need to pass a GitHub Apps token to the destinationUrl in my copybara.sky configuration file.
I have tried hardcoding the token directly in the URL like this:
python destinationUrl = "https://x-access-token:<token>@github.com/xxx/xx.git"
And it works as expected. However, for security and flexibility reasons, I'd like to pass the token from my Python script to the copybara.sky file instead of hardcoding it.
I have tried to add it to my .gitconfig file like below, but it does not work.
[http]
extraheader = x-access-token:{token}
Is there a way to pass a variable (in this case, the GitHub Apps token) from my Python environment to the copybara.sky file? If so, could you please guide me on how to achieve this?
The text was updated successfully, but these errors were encountered:
Are you setting the .gitconfig inside the docker image? Copybara should honor reading $HOME/.gitconfig. Another option would be to set the authentication mode in the .gitconfig of the cached repo Copybara creates.
Hello,
I'm currently working on synchronizing two repositories (from repoA to repoB) using Copybara running in a Docker container. Below is the command I'm using to initiate the sync process:
I've noticed that the name and email from ~/mongodb-bot.gitconfig are being utilized correctly during the sync to repoB. However, now I need to pass a GitHub Apps token to the destinationUrl in my copybara.sky configuration file.
I have tried hardcoding the token directly in the URL like this:
python
destinationUrl = "https://x-access-token:<token>@github.com/xxx/xx.git"
And it works as expected. However, for security and flexibility reasons, I'd like to pass the token from my Python script to the copybara.sky file instead of hardcoding it.
I have tried to add it to my .gitconfig file like below, but it does not work.
Is there a way to pass a variable (in this case, the GitHub Apps token) from my Python environment to the copybara.sky file? If so, could you please guide me on how to achieve this?
The text was updated successfully, but these errors were encountered: