Github Action Run - Security import is showing "One or more parameters passed to a function were not valid"error - github-actions

I built the input file (decoded base64 file into p12 file) as CERTIFICATE_PATH, P12_PASSWORD is password in secret, KEYCHAIN_PATH is defined. when I run the command on CLI, I get "1 item imported" success message. but when I run from *.yml file on GitHub action, I get "security: SecKeychainItemImport: One or more parameters passed to a function were not valid." error. any suggestions?
security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
CERTIFICATE_PATH - file that contains cert.p12 data,
KEYCHAIN_PATH is TEMP/app-signing.keychain-db

Another reason in Github actions could be that you are using the wrong environment.
Take a look at this ---> Difference between Github's "Environment" and "Repository" secrets?.
Set the right environment:
environment: production

found the issue.. was passing wrong cert file.. once added correct file in the security build , was able to get it working

Related

I need some solution please

I am getting the following error message:
Warning: Environment variable SUMO_HOME is not set, using built in type maps.
Warning: Environment variable SUMO_HOME is not set, schema resolution will use slow website lookups.
Error: unable to open file 'https://sumo.dlr.de/xsd/types_file.xsd'
In file 'built in type map'
At line/column 1/0.
The types could not be loaded from 'built in type map'.
Quitting (on error).
What could be causing this?
Error: unable to open file 'https://sumo.dlr.de/xsd/types_file.xsd'
It's http , not https. ... Please see this site https://sumo.dlr.de/wiki/Networks/PlainXML → $ wget http://sumo.dlr.de/xsd/types_file.xsd
My test (I created a test dir. sumo/TEST_COMMANDS/ with some default files + the "wget downloaded" types_file.xsd):
$ cd sumo/ && export SUMO_HOME="$PWD" && cd TEST_COMMANDS/
$ netconvert --node-files=input_nodes.nod.xml --edge-files=input_edges.edg.xml \
--connection-files=input_connections.con.xml --type-files=types_file.xsd \
--output-file=MySUMONet.net.xml
The terminal reply is : Success. ..... And the file MySUMONet.net.xml 61.4kB is created.

smbclient --authentication-file "session setup failed: NT_STATUS_INVALID_PARAMETER" and "SPNEGO(gse_krb5) NEG_TOKEN_INIT failed: NT_STATUS_NO_MEMORY"

(I have Centos 7 with samba-client.x86_64 4.6.2-8.el7 against windows server 2008 that is in a AD Domain controlled by separate windows server 2008 AD domain controller)
Started with this:
smbclient -W my.domain -U myuser //svr.my.domain/fred mypassword -c list
... which worked great, then decided to move domain,user and password into a file and use -A as described in the smbclient manpage. File windows-credentials, content:
username=myuser
domain=my.domain
password=mypassword
... with command line:
smbclient -A windows-credentials //svr.my.domain/fred -c list
.... did not work, gave error:
SPNEGO(gse_krb5) NEG_TOKEN_INIT failed: NT_STATUS_NO_MEMORY
session setup failed: NT_STATUS_NO_MEMORY
... an hour on the internet suggested lots of people had this trouble and just about each had a different ticked answer, and none of them worked for me. Tried various combinations of their answers - in particular, https://askubuntu.com/questions/1008992/ubuntu-17-10-to-access-windows-files-shares-within-workplace-it, and ended up with...
Created a separate my.smb.conf with just:
[global]
# seems to get rid of
# SPNEGO(gse_krb5) NEG_TOKEN_INIT failed: NT_STATUS_NO_MEMORY
client use spnego = no
# seems to get rid of
# session setup failed: NT_STATUS_NO_MEMORY
client ntlmv2 auth = no
... and used:
smbclient -s my.smb.conf -A windows-credentials //svr.my.domain/fred -c list
... and it looks like it works, but I'm not really sure as there seems to be credentials caching and a complete lack of information on how this stuff works or is supposed to work.
Can anyone actually explain any of this? Even if not, perhaps yet another answer to this problem will help someone somewhere.
This appears to be specific to Windows 2008. Attaching to Windows Server 2016 works without the modified smb.conf file. I have been unable to locate any real details.
In case of problems with smbclient
you can mount smb folder and use it like local folder
mount -t cifs //<ip>/<share folder>$ /mnt -o user=<user>,pass=<password>,domain=<workdomain>

Having issues with setting up yii2 basic framework and ibm bluemix

Having issues with setting up yii2 basic framework and ibm bluemix.
I was using this link as a guide: https://github.com/Twanawebtech/yii2App-Bluemix/blob/master/README.md
Step 1a: clone the code and setup
Open your terminal
$ git clone https://github.com/Twanawebtech/yii2App-Bluemix.git
$ cd yii2App-Bluemix
Step 1b: Set cookie validation key in config/web.php file to some random secret string:
'request' => [
// !!! insert a secret key in the following (if it is empty)
- this is required by cookie validation
'cookieValidationKey' => '<secret random string goes here>',
],
Step 1c: You can then access the application through the following URL:
http://localhost/yii2App-Bluemix/web
you should see the Congratulations Screen
Step 1d: Manifest
Go back to the yii2App-Bluemix folder
and open the manifest file
rename name and host to the name you want to call it.
Go to the command prompt and using cloud Foundary CLI (once you have setup cloud Foundary CLI)
enter cf login
API endpoint: https://api.ng.bluemix.net
enter Email Address:
enter Password:
Select a space (if you have more than one space allocated)
Step 2: Push your code to Bluemix
$ cf push yii2App-Bluemix -b https://github.com/cloudfoundry/php-buildpack.git -s cflinuxfs2
Step 3: Access your app by entering the following URL into your browser:
http://yii2basic.mybluemix.net/yii
However I don't get the congratulations screen but instead I get the following which is the source code of the index.php file found in the web folder
What am I missing or forgot to do???

Export .MWB to working .SQL file using command line

We recently installed a server dedicated to unit tests, which deploys
updates automatically via Jenkins when commits are done, and sends
mails when a regression is noticed
> This requires our database to always be up-to-date
Since the database-schema-reference is our MWB, we added some scripts
during deploy, which export the .mwb to a .sql (using python) This
worked fine... but still has some issues
Our main concern is that the functions attached to the schema are not exported at all, which makes the DB unusable.
We'd like to hack into the python code to make it export scripts... but didn't find enough informations about it.
Here is the only piece of documentation we found. It's not very clear for us. We didn't find any information about exporting scripts.
All we found is that a db_Script class exists. We don't know where we can find its instances in our execution context, nor if they can be exported easily. Did we miss something ?
For reference, here is the script we currently use for the mwb to sql conversion (mwb2sql.sh).
It calls the MySqlWorkbench from command line (we use a dummy x-server to flush graphical output.)
What we need to complete is the python part passed in our command-line call of workbench.
# generate sql from mwb
# usage: sh mwb2sql.sh {mwb file} {output file}
# prepare: set env MYSQL_WORKBENCH
if [ "$MYSQL_WORKBENCH" = "" ]; then
export MYSQL_WORKBENCH="/usr/bin/mysql-workbench"
fi
export INPUT=$(cd $(dirname $1);pwd)/$(basename $1)
export OUTPUT=$(cd $(dirname $2);pwd)/$(basename $2)
"$MYSQL_WORKBENCH" \
--open $INPUT \
--run-python "
import os
import grt
from grt.modules import DbMySQLFE as fe
c = grt.root.wb.doc.physicalModels[0].catalog
fe.generateSQLCreateStatements(c, c.version, {})
fe.createScriptForCatalogObjects(os.getenv('OUTPUT'), c, {})" \
--quit-when-done
set -e

Error when trying to read the .ini file from .nsi script

I have to write a NSIS script for deployment the report on the server.It works fine when I am using localhost.
Now I want to send this package to my client but the problem is that I don't know the SERVER IP of the client for this purpose I have write the .ini file. The content of the ini file is
DeployReport.ini
[SETTINGS]
ServerIp=localhost
UserName=
PassWord=
DeployReport.nsi
# Script generated by DeepSofts - NSIS Script Generator
# Beginning Basic Section Script ...
Name 'DeployReport'
Icon 'modern-install-full.ico'
OutFile 'DeployReport.exe'
SilentInstall Normal
CRCCheck On
Section GetIP 0
ReadINIStr $ip "DeployReport.ini" "SETTINGS" "ServerIp"
MessageBox MB_OK "$ip"
SectionEnd
Section Command 1
Exec '"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\rs.exe" -i PublishSampleReports.rss -s http://localhost/reportserver"'
SectionEnd
ComponentText 'A few details about the application that you have created'
AutoCloseWindow True
SetCompress Auto
SetDateSave On
SetDataBlockOptimize On
The problem is that the DeployReport.nsi script works fine untill I dont use the Section GetIP 0 and I am not able to find the error in the script.
You should use the full path to the .ini ("$exedir\DeployReport.ini")