Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@finos/git-proxy",
"version": "1.2.0",
"version": "1.2.1",
"description": "Deploy custom push protections and policies on top of Git.",
"scripts": {
"cli": "node ./packages/git-proxy-cli/index.js",
Expand Down
23 changes: 3 additions & 20 deletions src/proxy/processors/push-action/pullRemote.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,9 @@ const exec = async (req, action) => {

const cmd = `git clone ${action.url} --bare`;

// Retrieve authorization headers
const authorizationHeader = req.headers?.authorization;

// Validate the authorization headers
const authorizationValid =
authorizationHeader &&
typeof authorizationHeader === 'string' &&
authorizationHeader.includes('Basic ');

// Construct clone URL depending on presence of authorization headers
const cloneUrl = authorizationValid
? `https://${Buffer.from(authorizationHeader.split(' ')[1], 'base64')}@${action.url.replace(
/https*:\/\//,
'',
)}`
: action.url;

step.log(`Exectuting ${cmd}${authorizationValid ? ' with credentials' : ''}`);

const response = spawnSync('git', ['clone', cloneUrl, '--bare', '--progress'], {
step.log(`Exectuting ${cmd}`);

const response = spawnSync('git', ['clone', action.url, '--bare', '--progress'], {
cwd: action.proxyGitPath,
encoding: 'utf-8',
});
Expand Down
2 changes: 1 addition & 1 deletion website/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install -g @finos/git-proxy-cli
To install a specific version of Git Proxy, append the version to the end of the install command:

```bash
npm install -g @finos/git-proxy@1.2.0
npm install -g @finos/git-proxy@1.2.1
```

To install a specific version of the Git Proxy CLI, append the version to the end of the install command:
Expand Down
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
projectName: `${projectName}`,
organizationName: 'FINOS',
customFields: {
version: '1.2.0',
version: '1.2.1',
},
scripts: ['https://buttons.github.io/buttons.js'],
stylesheets: ['https://fonts.googleapis.com/css?family=Overpass:400,400i,700'],
Expand Down