-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modified to use Git with PAT #4571
Open
sZma5a
wants to merge
44
commits into
pipe-cd:master
Choose a base branch
from
sZma5a:feat/add-pat-setting
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+135
−2
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
04843c3
fix to read PAT settings from file
090bfad
piped
49e2a75
include PAT information in URL
fa62b38
fix: modification of conditional branching
sZma5a 0d4044f
fix: corrected error in error message
sZma5a fa02cc0
fix: integration of mask function
8d0913b
fix: make validation test
977b226
fix: function name
52eff10
fix: rename function for validation PAT
ad9963e
fix: fix test code as pointed out in the review
64a7654
feat: add explan
86ed2d2
fix: change required in documentation
sZma5a a278707
fix: change return value
sZma5a 1b5f066
fix: add test case
sZma5a c3b15a1
fix: fix test
sZma5a d5408a6
fix: PipedGit struct to use password
sZma5a d2eea5a
fix to read PAT settings from file
986bffd
piped
1cd34f0
fix: integration of mask function
0dd6ad3
fix: make validation test
30857d4
fix: function name
b40f9ba
fix: rename function for validation PAT
1a75a4a
fix: fix test
sZma5a b58272c
fix: PipedGit struct to use password
sZma5a 5522782
Fix Git authentication configuration
sZma5a c30f780
Update password authentication configuration
sZma5a 3ae056d
Fix error variable name
sZma5a 68814f3
Fix rename password
sZma5a 1217a06
Refactor includePasswordAuthRemote function
sZma5a bda8b24
Update password authentication in clone test
sZma5a 6a8fca3
fix: delete PasswordAuth
5d4c060
fix: remove unused PasswordAuth field and refactor password authentic…
e6ec0e1
Remove unnecessary print statement in Validate function
0e05d89
fix: fix code for rebase
06cf6ef
fix: remove unused GitPasswordAuth configuration
c1b767a
feat: add password decoding for password in includePasswordRemote fun…
be877b5
fix: refactor Git password authentication method
b282a03
fix: update password encoding in TestCloneUsingPassword
744beee
Update docs/content/en/docs-dev/user-guide/managing-piped/configurati…
sZma5a b1456f6
Update pkg/config/piped.go
sZma5a ee0851d
[wip] delete password
719c326
[wip] not tested - change token to args from url
8f7930c
Fix commented out test case
sZma5a 1291bab
Refactor authentication in git client
sZma5a File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first, thank you for investigating and the fix 🙏 I don't know such an option! It's so helpful 👍
noted: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpextraHeader
I tried the expected command with a private repo
git -c http.extraHeader="Authorization: Basic <base64 encoded value of username:password>" clone https://github.com/ffjlabo-playground/git-test.git
on mac.I encountered the behaviors written below. Does below also reproduce on your machine? Could you try it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry...
It worked when we looked into it before, but we will look into it again and verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Don't worry! I think this is a challenging. I'm so helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sZma5a ! Do you have any updates on the above? If you want some helps, feel free to ping me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ffjlabo
Sorry for the delay.
Regarding git, I was able to perform a clone using PAT in my environment with the following command.
In addition, the Golang code that was tested is shown below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked with the below command and succeeded in cloning the repository.
When I removed the
-n
option from echo as below, I got the same error with @ffjlabo.So, I think that @ffjlabo appended the
\n
to the password before encoding it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to be late 🙏
It's my fault, as Wrashi-san says. The command worked as expected.
Thank you!
BTW, there are some fixed points in this comment, so plz check it🙏
#4571 (review)