meveo-org / meveo

meveo core
GNU Affero General Public License v3.0
10 stars 15 forks source link

Default password is not showing in dialog for Git repositories UI #713

Closed masumcse1 closed 1 year ago

masumcse1 commented 1 year ago

Issue :
After created a git repository with a remote origin and save a default username and Default Remote Password, the default password is not showing in dialog when doing a pull or other, every git operation needs to type this remote password in dialog.

root cause:
After analysis, I got root cause of this issue. during data insertion time , git password save as encrypt format in db table (git_repository). dialog password value related with GitRepositoryBean.password attribute , but this value is not initialized from db during dialog initialization time. as a result, password value is not showing in dialog. that's why need to do type this remote password every time in dialog.

Solution: After save this default username & password then every git operation i have set this remote password (encrypted) in dialog. during every git operation (push/pull/fetch) again I have decrypted this password.

impacted fle:
I have modified few functions from bellow class : saveOrUpdateGit(), pushRemote(),fetchRemote(),pullRemote(),getPassword() ,installMissingDependencies()

meveo-admin-web/src/main/java/org/meveo/admin/action/storage/GitRepositoryBean.java