Skip to content

Commit eff84a4

Browse files
committed
Fix Maven SCM URLs and git credentials
- Change SCM URLs from SSH to HTTPS in pom.xml - Configure git credential helper with GitHub token - Maven-release-plugin uses SCM URLs, not git remote
1 parent 93f1636 commit eff84a4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/maven-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
run: |
3131
git config user.name "GitHub Actions"
3232
git config user.email "[email protected]"
33-
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
33+
git config credential.helper 'store --file ~/.git-credentials'
34+
echo "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com" > ~/.git-credentials
3435
3536
- name: Set up Maven settings.xml
3637
uses: s4u/maven-settings-action@v2

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@
175175
</dependencies>
176176

177177
<scm>
178-
<connection>scm:git:git@github.com:anypointcloud/json-logger.git</connection>
179-
<developerConnection>scm:git:git@github.com:anypointcloud/json-logger.git</developerConnection>
178+
<connection>scm:git:https://github.com/anypointcloud/json-logger.git</connection>
179+
<developerConnection>scm:git:https://github.com/anypointcloud/json-logger.git</developerConnection>
180180
<url>https://github.com/anypointcloud/json-logger</url>
181181
<tag>HEAD</tag>
182182
</scm>

0 commit comments

Comments
 (0)