From 8ab51e350f29eaa81cc15c9b1ce3d88ca8635e3d Mon Sep 17 00:00:00 2001 From: Stefano Dafarra Date: Thu, 26 Jun 2025 14:34:47 +0200 Subject: [PATCH 1/3] Remove the mention to the credential manager in the local workflow It was causing issues when trying to push to another fork. --- .github/local-workflow-tech.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/local-workflow-tech.md b/.github/local-workflow-tech.md index 3f9b5c2b19..6b9bf96490 100644 --- a/.github/local-workflow-tech.md +++ b/.github/local-workflow-tech.md @@ -17,25 +17,16 @@ Technicalities underlying the fast-pace local workflow - Switch to the branch corresponding to the robot (e.g., `devel-ergoCubSN???`). ## 🔲 Set the default committer -- Fine-grained PAT can be scoped to work on a specified organization and only on a specified repository. -- To store credentials locally, one needs to issue the following, once the fork is cloned locally: +- In order to push to the ``icub-tech`` fork without password, it is necessary to get a PAT from the maintainer. Then, issue the following commands: ```console git config --local user.name "icub-tech-iit-bot" git config --local user.email "icub-tech@iit.it" - git config --local credential.https://github.com/icub-tech-iit/robots-configuration.git.helper store + PAT= + git remote set-url icub-tech https://x-access-token:${PAT}@github.com/icub-tech-iit/robots-configuration.git ``` ⚠️ Note the use of the option `--local` to avoid impacting Git globally on the system. -- In order to push without password, the PAT needs to be provided. The credentials will be stored plainly under `~/.git-credentials`. No worries though, as this PAT has a very narrowed use and impacts a fork that is backed up anyhow by the upstream repository. -- The PAT can be stored manually in `~/.git-credentials` with the format `https://icub-tech-iit-bot:${PAT}@github`. Alternatively, when attempting to push the first time, it is enough to use `icub-tech-iit-bot` as user and specifying the `PAT` as password. This will be stored in the `~/.git-credentials` file automatically. -- ⚠️ Being the local system shared, no one else should store his/her PAT in the same file. - The PAT is set to have no expiration. However, it can be revoked at any time by the maintainer. -> [!tip] -> Instead of relying on the credential helper, one can resort to a simpler method: -> ```console -> git remote set-url icub-tech https://x-access-token:${PAT}@github.com/icub-tech-iit/robots-configuration.git -> ``` - ## 🔲 Ensure that the author information is specified explicitly at commit time - We do rely on [Git hoooks](../.githooks). - Run the following command from the `robots-configuration` root folder: From 6ff3241d0d37e2baa144b7e98729d94fb297cb24 Mon Sep 17 00:00:00 2001 From: Ugo Pattacini Date: Thu, 26 Jun 2025 18:28:21 +0200 Subject: [PATCH 2/3] Update .github/local-workflow-tech.md --- .github/local-workflow-tech.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/local-workflow-tech.md b/.github/local-workflow-tech.md index 6b9bf96490..1f1c2f7a64 100644 --- a/.github/local-workflow-tech.md +++ b/.github/local-workflow-tech.md @@ -17,7 +17,7 @@ Technicalities underlying the fast-pace local workflow - Switch to the branch corresponding to the robot (e.g., `devel-ergoCubSN???`). ## 🔲 Set the default committer -- In order to push to the ``icub-tech`` fork without password, it is necessary to get a PAT from the maintainer. Then, issue the following commands: +- In order to push to the `icub-tech` fork without password, it is necessary to get a PAT from the maintainer. Then, issue the following commands: ```console git config --local user.name "icub-tech-iit-bot" git config --local user.email "icub-tech@iit.it" From 8b1e9264cccfcb400abcef8aa55e51428aa27b70 Mon Sep 17 00:00:00 2001 From: Ugo Pattacini Date: Thu, 26 Jun 2025 18:28:31 +0200 Subject: [PATCH 3/3] Update .github/local-workflow-tech.md --- .github/local-workflow-tech.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/local-workflow-tech.md b/.github/local-workflow-tech.md index 1f1c2f7a64..5e90aeec6d 100644 --- a/.github/local-workflow-tech.md +++ b/.github/local-workflow-tech.md @@ -21,8 +21,7 @@ Technicalities underlying the fast-pace local workflow ```console git config --local user.name "icub-tech-iit-bot" git config --local user.email "icub-tech@iit.it" - PAT= - git remote set-url icub-tech https://x-access-token:${PAT}@github.com/icub-tech-iit/robots-configuration.git + PAT= git remote set-url icub-tech https://x-access-token:${PAT}@github.com/icub-tech-iit/robots-configuration.git ``` ⚠️ Note the use of the option `--local` to avoid impacting Git globally on the system. - The PAT is set to have no expiration. However, it can be revoked at any time by the maintainer.